Re: [syzbot] [net?] general protection fault in put_page (3)

From: Hillf Danton
Date: Fri Nov 01 2024 - 19:52:37 EST


On Fri, 01 Nov 2024 10:44:24 -0700
> syzbot found the following issue on:
>
> HEAD commit: f9f24ca362a4 Add linux-next specific files for 20241031
> git tree: linux-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=153e5540580000

#syz test

--- x/lib/iov_iter.c
+++ y/lib/iov_iter.c
@@ -1727,6 +1727,10 @@ static ssize_t iov_iter_extract_bvec_pag

(*pages)[k++] = bv.bv_page;
size += bv.bv_len;
+ if (size > maxsize) {
+ size = maxsize;
+ break;
+ }

if (k >= maxpages)
break;
--