Re: [syzbot] WARNING in is_valid_gup_args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mate:   Mon, 06 Feb 2023 22:23:56 -0800
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    49a8133221c7 Add linux-next specific files for 20230207
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=15016013480000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=3691b32dd4410e01
> dashboard link: https://syzkaller.appspot.com/bug?extid=1f0c9407f4d20f7488b9
> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> 
> Unfortunately, I don't have any reproducer for this issue yet.
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/6277c699d71e/disk-49a81332.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/cbef27c2f238/vmlinux-49a81332.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/7c0c68d93ac8/bzImage-49a81332.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1f0c9407f4d20f7488b9@xxxxxxxxxxxxxxxxxxxxxxxxx
> 
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 11452 at mm/gup.c:2121 is_valid_gup_args+0x1d8/0x230 mm/gup.c:2121
> Modules linked in:
> CPU: 1 PID: 11452 Comm: syz-executor.0 Not tainted 6.2.0-rc7-next-20230207-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
> RIP: 0010:is_valid_gup_args+0x1d8/0x230 mm/gup.c:2121
> Code: c7 ff 48 83 3c 24 00 0f 85 7a ff ff ff e8 10 3a c7 ff 0f 0b 45 31 e4 eb cd e8 04 3a c7 ff 0f 0b 45 31 e4 eb c1 e8 f8 39 c7 ff <0f> 0b 45 31 e4 eb b5 e8 ec 39 c7 ff 0f 0b 45 31 e4 eb a9 e8 e0 39
> RSP: 0018:ffffc900091f72c0 EFLAGS: 00010212
> RAX: 000000000000165e RBX: 0000000000040000 RCX: ffffc90003dc1000
> RDX: 0000000000040000 RSI: ffffffff81bd3248 RDI: 0000000000000005
> RBP: ffffc900091f7320 R08: 0000000000000005 R09: 0000000000000000
> R10: 0000000000040000 R11: 0000000000000000 R12: 0000000000000000
> R13: 0000000000000000 R14: 0000000000040000 R15: 0000000000040000
> FS:  00007f31c3ca4700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000001b31624000 CR3: 0000000027a30000 CR4: 00000000003506e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
>  <TASK>
>  pin_user_pages_fast+0x83/0x100 mm/gup.c:3089
>  iov_iter_extract_user_pages lib/iov_iter.c:2160 [inline]
>  iov_iter_extract_pages+0x2b9/0x1e20 lib/iov_iter.c:2229
>  __bio_iov_iter_get_pages block/bio.c:1267 [inline]
>  bio_iov_iter_get_pages block/bio.c:1340 [inline]
>  bio_iov_iter_get_pages+0x354/0x1580 block/bio.c:1327
>  iomap_dio_bio_iter+0x830/0x1440 fs/iomap/direct-io.c:323
>  iomap_dio_iter fs/iomap/direct-io.c:436 [inline]
>  __iomap_dio_rw+0xd81/0x1d80 fs/iomap/direct-io.c:594
>  iomap_dio_rw+0x40/0xa0 fs/iomap/direct-io.c:682
>  ext4_dio_write_iter fs/ext4/file.c:587 [inline]
>  ext4_file_write_iter+0x1053/0x1710 fs/ext4/file.c:698
>  call_write_iter include/linux/fs.h:1851 [inline]
>  do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735
>  do_iter_write+0x182/0x700 fs/read_write.c:861
>  vfs_writev+0x1aa/0x670 fs/read_write.c:934
>  do_pwritev+0x1b6/0x270 fs/read_write.c:1031
>  __do_sys_pwritev2 fs/read_write.c:1090 [inline]
>  __se_sys_pwritev2 fs/read_write.c:1081 [inline]
>  __x64_sys_pwritev2+0xef/0x150 fs/read_write.c:1081
>  do_syscall_x64 arch/x86/entry/common.c:50 [inline]
>  do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
>  entry_SYSCALL_64_after_hwframe+0x63/0xcd

Quick fix like the diff below can be test when a reproducer is available.

--- x/lib/iov_iter.c
+++ y/lib/iov_iter.c
@@ -2140,7 +2140,7 @@ static ssize_t iov_iter_extract_user_pag
 					   size_t *offset0)
 {
 	unsigned long addr;
-	unsigned int gup_flags = FOLL_PIN;
+	unsigned int gup_flags = 0;
 	size_t offset;
 	int res;
 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux