Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

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 <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>
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)