Skip to content

Commit f37e76a

Browse files
Dan Carpentergregkh
authored andcommitted
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: 7b3ad5a ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Cc: stable <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ef25725 commit f37e76a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@ static int create_component(struct vchiq_mmal_instance *instance,
939939
m.u.component_create.client_component = component->client_component;
940940
strscpy_pad(m.u.component_create.name, name,
941941
sizeof(m.u.component_create.name));
942+
m.u.component_create.pid = 0;
942943

943944
ret = send_synchronous_mmal_msg(instance, &m,
944945
sizeof(m.u.component_create),

0 commit comments

Comments
 (0)