syzbot


WARNING in __dma_map_sg_attrs

Status: fixed on 2023/02/24 13:50
Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
Fix commit: 9e9fa6a9198b udmabuf: Set the DMA mask for the udmabuf device (v2)
First crash: 1078d, last: 824d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in dma_map_sg_attrs (log)
Repro: C syz .config
  
Discussions (11)
Title Replies (including bot) Last reply
[PATCH 5.10 00/37] 5.10.141-rc1 review 45 (45) 2022/09/05 07:44
[PATCH 5.19 00/72] 5.19.7-rc1 review 83 (83) 2022/09/03 14:20
[PATCH 5.4 00/77] 5.4.212-rc1 review 83 (83) 2022/09/03 13:11
[PATCH 5.15 00/73] 5.15.65-rc1 review 81 (81) 2022/09/03 10:47
[PATCH AUTOSEL 5.10 01/46] drm/r128: Fix undefined behavior due to shift overflowing the constant 44 (44) 2022/08/13 13:44
[PATCH AUTOSEL 5.4 01/25] drm/r128: Fix undefined behavior due to shift overflowing the constant 26 (26) 2022/08/12 08:39
[PATCH AUTOSEL 5.19 001/105] fbdev: Restart conflicting fb removal loop when unregistering devices 101 (101) 2022/08/11 15:56
[PATCH AUTOSEL 5.15 01/69] fbdev: Restart conflicting fb removal loop when unregistering devices 63 (63) 2022/08/11 15:56
[PATCH AUTOSEL 5.18 01/93] fbdev: Restart conflicting fb removal loop when unregistering devices 86 (86) 2022/08/11 15:42
[PATCH] udmabuf: Set the DMA mask for the udmabuf device (v2) 1 (1) 2022/05/20 20:52
[syzbot] WARNING in __dma_map_sg_attrs 3 (5) 2022/05/19 12:25
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2022/05/09 23:06 18m bisect fix upstream OK (0) job log log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3605 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 1 PID: 3605 Comm: syz-executor310 Not tainted 5.19.0-rc7-syzkaller-00005-gca85855bdcae #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d 90 b2 c2 0d e9 db fe ff ff e8 26 ab 13 00 0f 0b e8 1f ab 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 10 ab 13 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc9000302fd68 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807d9c0000 RSI: ffffffff8166c141 RDI: ffff88801e1b9378
RBP: ffff88801e1b9000 R08: 0000000000000005 R09: 0000000000000002
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000001
R13: ffff888020f91ac0 R14: 0000000000000001 R15: 0000000000000000
FS:  00005555574dc300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005d84c8 CR3: 0000000077ad8000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
 get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:75
 begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:129
 dma_buf_begin_cpu_access+0xfd/0x1e0 drivers/dma-buf/dma-buf.c:1186
 dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:364
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f102ab80c19
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe206b49d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f102ab80c19
RDX: 0000000020000100 RSI: 0000000040086200 RDI: 0000000000000006
RBP: 00007f102ab44dc0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f102ab44e50
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (65):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/20 11:46 upstream ca85855bdcae 775344bc .config strace log report syz C ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/07/10 06:55 upstream b1c428b6c368 b5765a15 .config strace log report syz C ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/07/10 06:00 upstream b1c428b6c368 b5765a15 .config strace log report syz C ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/07/10 05:40 upstream b1c428b6c368 b5765a15 .config strace log report syz C ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/07/10 05:19 upstream b1c428b6c368 b5765a15 .config strace log report syz C ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/07/10 04:59 upstream b1c428b6c368 b5765a15 .config strace log report syz C ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/05/26 15:01 upstream 7e062cda7d90 3037caa9 .config strace log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/26 14:15 upstream 7e062cda7d90 3037caa9 .config strace log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/26 13:54 upstream 7e062cda7d90 3037caa9 .config strace log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/26 13:34 upstream 7e062cda7d90 3037caa9 .config strace log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/26 13:14 upstream 7e062cda7d90 3037caa9 .config strace log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/26 12:45 upstream 7e062cda7d90 3037caa9 .config strace log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/02/05 21:31 upstream 0457e5153e0e a7dab638 .config console log report syz C ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/02/05 20:17 upstream 0457e5153e0e a7dab638 .config console log report syz C ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/05/26 12:54 linux-next b1d84fc09a96 3037caa9 .config strace log report syz C ci-upstream-linux-next-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/08/08 12:25 upstream 200e340f2196 88e3a122 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/07/01 22:36 upstream a175eca0f3d7 1434eec0 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/06/19 20:39 upstream 05c6ca8512f2 8f633d84 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/06/17 20:56 upstream f0ec9c65a8d6 cb58b3b2 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/06/07 14:21 upstream e71e60cd74df c8857892 .config console log report info ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/06/06 17:57 upstream f2906aa86338 c8857892 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/06/06 17:31 upstream f2906aa86338 c8857892 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/05/26 13:30 upstream 7e062cda7d90 3037caa9 .config console log report info ci-upstream-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/05/26 12:36 upstream 7e062cda7d90 3037caa9 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/05/26 12:29 upstream 7e062cda7d90 3037caa9 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/26 12:28 upstream d7227785e384 3037caa9 .config console log report info ci-qemu-upstream WARNING in __dma_map_sg_attrs
2022/05/15 19:12 upstream bc403203d65a 744a39e2 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/14 18:19 upstream ec7f49619d8e 744a39e2 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/05/14 18:18 upstream ec7f49619d8e 744a39e2 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/14 18:11 upstream ec7f49619d8e 744a39e2 .config console log report info ci-qemu-upstream WARNING in __dma_map_sg_attrs
2022/05/13 06:58 upstream 0ac824f379fb 9ad6612a .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/05/11 23:06 upstream feb9c5e19e91 beb0b407 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/04/07 03:38 upstream 3e732ebf7316 97582466 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/03/13 05:40 upstream aad611a868d1 9e8eaa75 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/03/12 03:14 upstream 79b00034e9dc 9e8eaa75 .config console log report info ci-upstream-kasan-gce WARNING in __dma_map_sg_attrs
2022/03/06 19:00 upstream dcde98da9970 7bdd8b2c .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/02/05 19:59 upstream 0457e5153e0e a7dab638 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in __dma_map_sg_attrs
2022/01/18 04:53 upstream 0c947b893d69 731a2d23 .config console log report info ci-qemu-upstream WARNING in __dma_map_sg_attrs
2022/01/10 11:49 upstream df0cc57e057f 2ca0d385 .config console log report info ci-qemu-upstream WARNING in __dma_map_sg_attrs
2021/11/27 18:13 upstream c5c17547b778 63eeac02 .config console log report info ci-qemu-upstream WARNING in __dma_map_sg_attrs
2022/08/08 12:24 upstream 200e340f2196 88e3a122 .config console log report info ci-upstream-kasan-gce-386 WARNING in __dma_map_sg_attrs
2022/06/07 20:57 upstream e71e60cd74df c8857892 .config console log report info ci-upstream-kasan-gce-386 WARNING in __dma_map_sg_attrs
2022/06/06 22:27 upstream f2906aa86338 c8857892 .config console log report info ci-upstream-kasan-gce-386 WARNING in __dma_map_sg_attrs
2022/05/26 12:35 upstream d7227785e384 3037caa9 .config console log report info ci-qemu-upstream-386 WARNING in __dma_map_sg_attrs
2022/05/26 12:29 upstream 7e062cda7d90 3037caa9 .config console log report info ci-upstream-kasan-gce-386 WARNING in __dma_map_sg_attrs
2022/05/14 18:21 upstream ec7f49619d8e 744a39e2 .config console log report info ci-upstream-kasan-gce-386 WARNING in __dma_map_sg_attrs
2022/05/14 18:13 upstream ec7f49619d8e 744a39e2 .config console log report info ci-qemu-upstream-386 WARNING in __dma_map_sg_attrs
2022/02/05 20:11 upstream 0457e5153e0e a7dab638 .config console log report info ci-upstream-kasan-gce-386 WARNING in __dma_map_sg_attrs
2022/06/07 14:54 linux-next 73d0e32571a0 c8857892 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/06/06 17:57 linux-next 40b58e42584b c8857892 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/05/26 12:38 linux-next b1d84fc09a96 3037caa9 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/05/14 18:21 linux-next 1e1b28b936ae 744a39e2 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __dma_map_sg_attrs
2022/03/19 20:02 linux-next 91265a6da44d e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __dma_map_sg_attrs
* Struck through repros no longer work on HEAD.