]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
media: em28xx: add missing em28xx_close_extension
authorPavel Skripkin <paskripkin@gmail.com>
Thu, 29 Jul 2021 20:23:33 +0000 (22:23 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Jan 2022 17:42:18 +0000 (18:42 +0100)
commitf2da036ba0a7b6dfbdc6ca849b0d2cfda37245ba
treef0207943d0b78609c34e3eaf5178d6e198968427
parent2f8dc464c877d6666833093e83ad0a353313fa52
media: em28xx: add missing em28xx_close_extension

BugLink: https://bugs.launchpad.net/bugs/1953387
[ Upstream commit 2c98b8a3458df03abdc6945bbef67ef91d181938 ]

If em28xx dev has ->dev_next pointer, we need to delete ->dev_next list
node from em28xx_extension_devlist on disconnect to avoid UAF bugs and
corrupted list bugs, since driver frees this pointer on disconnect.

Reported-and-tested-by: syzbot+a6969ef522a36d3344c9@syzkaller.appspotmail.com
Fixes: 1a23f81b7dc3 ("V4L/DVB (9979): em28xx: move usb probe code to a proper place")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/media/usb/em28xx/em28xx-cards.c