mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
staging: vc04_services: fix information leak in create_component()
commitf37e76abd6
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:7b3ad5abf0
("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>
This commit is contained in:
parent
008bf3d622
commit
8416da2df7
1 changed files with 1 additions and 0 deletions
|
@ -940,6 +940,7 @@ static int create_component(struct vchiq_mmal_instance *instance,
|
||||||
m.u.component_create.client_component = component->client_component;
|
m.u.component_create.client_component = component->client_component;
|
||||||
strscpy_pad(m.u.component_create.name, name,
|
strscpy_pad(m.u.component_create.name, name,
|
||||||
sizeof(m.u.component_create.name));
|
sizeof(m.u.component_create.name));
|
||||||
|
m.u.component_create.pid = 0;
|
||||||
|
|
||||||
ret = send_synchronous_mmal_msg(instance, &m,
|
ret = send_synchronous_mmal_msg(instance, &m,
|
||||||
sizeof(m.u.component_create),
|
sizeof(m.u.component_create),
|
||||||
|
|
Loading…
Reference in a new issue