Skip to content

Commit dda8ad0

Browse files
takaswietiwai
authored andcommitted
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 <[email protected]> Fixes: baa914c ("firewire: add kernel API to access CYCLE_TIME register") Signed-off-by: Takashi Sakamoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 56ec3e7 commit dda8ad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firewire/core-cdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ static int ioctl_get_cycle_timer2(struct client *client, union ioctl_arg *arg)
12111211
struct fw_cdev_get_cycle_timer2 *a = &arg->get_cycle_timer2;
12121212
struct fw_card *card = client->device->card;
12131213
struct timespec64 ts = {0, 0};
1214-
u32 cycle_time;
1214+
u32 cycle_time = 0;
12151215
int ret = 0;
12161216

12171217
local_irq_disable();

0 commit comments

Comments
 (0)