Skip to content

Commit

Permalink
staging: vc04_services: fix information leak in create_component()
Browse files Browse the repository at this point in the history
commit f37e76a upstream.

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>
  • Loading branch information
Dan Carpenter authored and gregkh committed Apr 3, 2024
1 parent 8155a50 commit 840c1f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
Expand Up @@ -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),
Expand Down

0 comments on commit 840c1f3

Please sign in to comment.