mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
firewire: cdev: fix potential leak of kernel stack due to uninitialized value
Recent change brings potential leak of value on kernel stack to userspace
due to uninitialized value.
This commit fixes the bug.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: baa914cd81
("firewire: add kernel API to access CYCLE_TIME register")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20220512112037.103142-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
56ec3e755b
commit
dda8ad0aa8
@ -1211,7 +1211,7 @@ static int ioctl_get_cycle_timer2(struct client *client, union ioctl_arg *arg)
|
||||
struct fw_cdev_get_cycle_timer2 *a = &arg->get_cycle_timer2;
|
||||
struct fw_card *card = client->device->card;
|
||||
struct timespec64 ts = {0, 0};
|
||||
u32 cycle_time;
|
||||
u32 cycle_time = 0;
|
||||
int ret = 0;
|
||||
|
||||
local_irq_disable();
|
||||
|
Loading…
Reference in New Issue
Block a user