summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-03-13 21:07:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-25 19:10:01 +0100
commitf37e76abd614b68987abc8e5c22d986013349771 (patch)
treed25ba1af7bf76c17cf5c0426f63a20642610b7a1
parentef25725b7f8aaffd7756974d3246ec44fae0a5cf (diff)
downloadlinux-stable-f37e76abd614b68987abc8e5c22d986013349771.tar.gz
linux-stable-f37e76abd614b68987abc8e5c22d986013349771.tar.bz2
linux-stable-f37e76abd614b68987abc8e5c22d986013349771.zip
staging: vc04_services: fix information leak in create_component()
The m.u.component_create.pid field is for debugging and in the mainline kernel it's not used anything. However, it still needs to be set to something to prevent disclosing uninitialized stack data. Set it to zero. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Cc: stable <stable@kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/2d972847-9ebd-481b-b6f9-af390f5aabd3@moroto.mountain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
index 6ca5797aeae5..4c3684dd902e 100644
--- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
@@ -939,6 +939,7 @@ static int create_component(struct vchiq_mmal_instance *instance,
m.u.component_create.client_component = component->client_component;
strscpy_pad(m.u.component_create.name, name,
sizeof(m.u.component_create.name));
+ m.u.component_create.pid = 0;
ret = send_synchronous_mmal_msg(instance, &m,
sizeof(m.u.component_create),