Files
linux/drivers
Ricardo B. Marliere 47aa8fcd5e media: pvrusb2: fix use after free on context disconnection
[ Upstream commit ded85b0c0edd8f45fec88783d7555a5b982449c1 ]

Upon module load, a kthread is created targeting the
pvr2_context_thread_func function, which may call pvr2_context_destroy
and thus call kfree() on the context object. However, that might happen
before the usb hub_event handler is able to notify the driver. This
patch adds a sanity check before the invalid read reported by syzbot,
within the context disconnection call stack.

Reported-and-tested-by: syzbot+621409285c4156a009b3@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000a02a4205fff8eb92@google.com/

Fixes: e5be15c638 ("V4L/DVB (7711): pvrusb2: Fix race on module unload")
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 14:34:26 -08:00
..
2023-09-23 10:59:52 +02:00
2023-11-08 11:23:42 +01:00
2022-05-09 09:03:20 +02:00
2023-11-20 10:30:12 +01:00
2020-12-30 11:51:26 +01:00
2024-01-25 14:34:21 -08:00
2022-08-25 11:18:33 +02:00
2023-07-27 08:37:19 +02:00