From: Greg Kroah-Hartman Date: Sun, 28 May 2023 16:29:11 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: review~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c6759e24d702ae3daa428367bfd739b44f508df;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: debugobjects-don-t-wake-up-kswapd-from-fill_pool.patch fbdev-udlfb-fix-endpoint-check.patch media-radio-shark-add-endpoint-checks.patch net-fix-stack-overflow-when-lro-is-disabled-for-virtual-interfaces.patch udplite-fix-null-pointer-dereference-in-__sk_mem_raise_allocated.patch usb-core-add-routines-for-endpoint-checks-in-old-drivers.patch usb-sisusbvga-add-endpoint-checks.patch --- diff --git a/queue-6.1/debugobjects-don-t-wake-up-kswapd-from-fill_pool.patch b/queue-6.1/debugobjects-don-t-wake-up-kswapd-from-fill_pool.patch new file mode 100644 index 00000000000..f608a07fca9 --- /dev/null +++ b/queue-6.1/debugobjects-don-t-wake-up-kswapd-from-fill_pool.patch @@ -0,0 +1,41 @@ +From eb799279fb1f9c63c520fe8c1c41cb9154252db6 Mon Sep 17 00:00:00 2001 +From: Tetsuo Handa +Date: Thu, 11 May 2023 22:47:32 +0900 +Subject: debugobjects: Don't wake up kswapd from fill_pool() + +From: Tetsuo Handa + +commit eb799279fb1f9c63c520fe8c1c41cb9154252db6 upstream. + +syzbot is reporting a lockdep warning in fill_pool() because the allocation +from debugobjects is using GFP_ATOMIC, which is (__GFP_HIGH | __GFP_KSWAPD_RECLAIM) +and therefore tries to wake up kswapd, which acquires kswapd_wait::lock. + +Since fill_pool() might be called with arbitrary locks held, fill_pool() +should not assume that acquiring kswapd_wait::lock is safe. + +Use __GFP_HIGH instead and remove __GFP_NORETRY as it is pointless for +!__GFP_DIRECT_RECLAIM allocation. + +Fixes: 3ac7fe5a4aab ("infrastructure to debug (dynamic) objects") +Reported-by: syzbot +Signed-off-by: Tetsuo Handa +Signed-off-by: Thomas Gleixner +Link: https://lore.kernel.org/r/6577e1fa-b6ee-f2be-2414-a2b51b1c5e30@I-love.SAKURA.ne.jp +Closes: https://syzkaller.appspot.com/bug?extid=fe0c72f0ccbb93786380 +Signed-off-by: Greg Kroah-Hartman +--- + lib/debugobjects.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/debugobjects.c ++++ b/lib/debugobjects.c +@@ -126,7 +126,7 @@ static const char *obj_states[ODEBUG_STA + + static void fill_pool(void) + { +- gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; ++ gfp_t gfp = __GFP_HIGH | __GFP_NOWARN; + struct debug_obj *obj; + unsigned long flags; + diff --git a/queue-6.1/fbdev-udlfb-fix-endpoint-check.patch b/queue-6.1/fbdev-udlfb-fix-endpoint-check.patch new file mode 100644 index 00000000000..9739ce16bfb --- /dev/null +++ b/queue-6.1/fbdev-udlfb-fix-endpoint-check.patch @@ -0,0 +1,94 @@ +From ed9de4ed39875706607fb08118a58344ae6c5f42 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Fri, 19 May 2023 15:32:30 -0400 +Subject: fbdev: udlfb: Fix endpoint check + +From: Alan Stern + +commit ed9de4ed39875706607fb08118a58344ae6c5f42 upstream. + +The syzbot fuzzer detected a problem in the udlfb driver, caused by an +endpoint not having the expected type: + +usb 1-1: Read EDID byte 0 failed: -71 +usb 1-1: Unable to get valid EDID from device/display +------------[ cut here ]------------ +usb 1-1: BOGUS urb xfer, pipe 3 != type 1 +WARNING: CPU: 0 PID: 9 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 +drivers/usb/core/urb.c:504 +Modules linked in: +CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted +6.4.0-rc1-syzkaller-00016-ga4422ff22142 #0 +Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google +04/28/2023 +Workqueue: usb_hub_wq hub_event +RIP: 0010:usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 +... +Call Trace: + + dlfb_submit_urb+0x92/0x180 drivers/video/fbdev/udlfb.c:1980 + dlfb_set_video_mode+0x21f0/0x2950 drivers/video/fbdev/udlfb.c:315 + dlfb_ops_set_par+0x2a7/0x8d0 drivers/video/fbdev/udlfb.c:1111 + dlfb_usb_probe+0x149a/0x2710 drivers/video/fbdev/udlfb.c:1743 + +The current approach for this issue failed to catch the problem +because it only checks for the existence of a bulk-OUT endpoint; it +doesn't check whether this endpoint is the one that the driver will +actually use. + +We can fix the problem by instead checking that the endpoint used by +the driver does exist and is bulk-OUT. + +Reported-and-tested-by: syzbot+0e22d63dcebb802b9bc8@syzkaller.appspotmail.com +Signed-off-by: Alan Stern +CC: Pavel Skripkin +Fixes: aaf7dbe07385 ("video: fbdev: udlfb: properly check endpoint type") +Signed-off-by: Helge Deller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/video/fbdev/udlfb.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/video/fbdev/udlfb.c ++++ b/drivers/video/fbdev/udlfb.c +@@ -27,6 +27,8 @@ + #include