[syzbot] [mm?] BUG: unable to handle kernel NULL pointer dereference in __kmap_local_page_prot

17 views
Skip to first unread message

syzbot

unread,
Oct 4, 2023, 1:50:47 PM10/4/23
to ak...@linux-foundation.org, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: ce36c8b14987 Merge tag 'ubifs-for-linus-6.6-rc5' of git://..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=151d1e92680000
kernel config: https://syzkaller.appspot.com/x/.config?x=6b4e3baedc34d5e0
dashboard link: https://syzkaller.appspot.com/bug?extid=b18872ea9631b5dcef3b
compiler: arm-linux-gnueabi-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/8ead8862021c/non_bootable_disk-ce36c8b1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8347e21e2813/vmlinux-ce36c8b1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/65c05c43e3fe/zImage-ce36c8b1.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b18872...@syzkaller.appspotmail.com

8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
[00000000] *pgd=85891003, *pmd=e44a7003
Internal error: Oops: 207 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 22169 Comm: syz-executor.1 Not tainted 6.6.0-rc4-syzkaller #0
Hardware name: ARM-Versatile Express
PC is at page_zonenum include/linux/mmzone.h:1086 [inline]
PC is at __kmap_local_page_prot+0xc/0x74 mm/highmem.c:573
LR is at kmap_local_page include/linux/highmem-internal.h:73 [inline]
LR is at copy_page_to_iter+0xf8/0x184 lib/iov_iter.c:479
pc : [<804640a4>] lr : [<807da754>] psr: 60000013
sp : eb215bf8 ip : eb215c08 fp : eb215c04
r10: 00000018 r9 : 828544e8 r8 : 00000000
r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 85a67c00
r3 : 00c00000 r2 : 0000071f r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 30c5387d Table: 8a553240 DAC: 00000000
Register r0 information: NULL pointer
Register r1 information: NULL pointer
Register r2 information: non-paged memory
Register r3 information: non-paged memory
Register r4 information: slab kmalloc-1k start 85a67c00 pointer offset 0 size 1024
Register r5 information: NULL pointer
Register r6 information: NULL pointer
Register r7 information: NULL pointer
Register r8 information: NULL pointer
Register r9 information: non-slab/vmalloc memory
Register r10 information: non-paged memory
Register r11 information: 2-page vmalloc region starting at 0xeb214000 allocated at kernel_clone+0xac/0x424 kernel/fork.c:2909
Register r12 information: 2-page vmalloc region starting at 0xeb214000 allocated at kernel_clone+0xac/0x424 kernel/fork.c:2909
Process syz-executor.1 (pid: 22169, stack limit = 0xeb214000)
Stack: (0xeb215bf8 to 0xeb216000)
5be0: eb215c3c eb215c08
5c00: 807da754 804640a4 eb215c2c eb215ee8 8024bc7c 85a67c00 85a67c00 00000000
5c20: 00000001 00000000 00000038 00000018 eb215c8c eb215c40 813c94e0 807da668
5c40: 81345950 802dcce4 85896a00 85896ad0 89e8b600 85896ad8 eb215ee8 00000000
5c60: 00000000 89e8b600 00000038 85896a00 82e6d240 00000000 00000000 00000000
5c80: eb215cfc eb215c90 815e3418 813c93fc 00000000 00000002 eb215ca4 00000000
5ca0: 00000000 00000000 89e8b6a8 85896aec 89e8b83c eb215ed8 00000000 00000000
5cc0: 00000000 00000000 00000000 7b6cdf11 00000000 815e32c8 eb215ed8 848e3680
5ce0: 00000000 00000000 00000000 eb215d4c eb215d1c eb215d00 815e2758 815e32d4
5d00: 00000000 00000000 00000000 815e2720 eb215d3c eb215d20 81340208 815e272c
5d20: eb215ed8 848e3680 20000500 00000000 eb215dfc eb215d40 8134040c 813401c4
5d40: 00000000 00000000 00000001 00000000 00000000 00000000 00000000 00000000
5d60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5d80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5da0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5dc0: 00000000 00000000 00000000 7b6cdf11 00000000 00000000 eb215ed8 20000500
5de0: 00000000 848e3680 82e6d240 00000001 eb215e7c eb215e00 81342f58 81340388
5e00: 00000000 00000000 00000009 00000000 00000000 20000580 00000038 00000000
5e20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5e40: 00000000 00000000 00000000 00000000 00000000 7b6cdf11 eb215e7c eb215eb8
5e60: 20000500 00000000 00000000 00000000 eb215f5c eb215e80 81343080 81342edc
5e80: 00000000 eb215e90 80889cc0 848e3680 00000001 00000000 00000000 00000000
5ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000001 ffffffff
5ec0: 000f4240 eb215ed8 eb215f24 000509e0 00000000 00000000 eb215d4c 00000000
5ee0: 00000000 00000000 00000005 00000001 00000001 20000580 00000037 00000000
5f00: 00000001 00000000 00000000 00000001 00000000 00000000 00000000 00000000
5f20: 00000000 00000000 eb215f44 7b6cdf11 8183c20c 00000003 20000500 00000000
5f40: 00000000 00000001 82e6d240 0000016d eb215fa4 eb215f60 81343a50 81342f98
5f60: 00000000 eb215fb0 00000000 00000000 00000000 00000000 eb215fac 7b6cdf11
5f80: 8020c8d0 00000000 00000000 0014c2c8 0000016d 80200288 00000000 eb215fa8
5fa0: 80200060 81343998 00000000 00000000 00000003 20000500 00000001 00000000
5fc0: 00000000 00000000 0014c2c8 0000016d 7ead532e 7ead532f 003d0f00 76bf20fc
5fe0: 76bf1f08 76bf1ef8 00016688 000509e0 60000010 00000003 00000000 00000000
Backtrace:
[<80464098>] (__kmap_local_page_prot) from [<807da754>] (kmap_local_page include/linux/highmem-internal.h:73 [inline])
[<80464098>] (__kmap_local_page_prot) from [<807da754>] (copy_page_to_iter+0xf8/0x184 lib/iov_iter.c:479)
[<807da65c>] (copy_page_to_iter) from [<813c94e0>] (sk_msg_recvmsg+0xf0/0x3cc net/core/skmsg.c:437)
r10:00000018 r9:00000038 r8:00000000 r7:00000001 r6:00000000 r5:85a67c00
r4:85a67c00
[<813c93f0>] (sk_msg_recvmsg) from [<815e3418>] (unix_bpf_recvmsg net/unix/unix_bpf.c:73 [inline])
[<813c93f0>] (sk_msg_recvmsg) from [<815e3418>] (unix_bpf_recvmsg+0x150/0x444 net/unix/unix_bpf.c:50)
r10:00000000 r9:00000000 r8:00000000 r7:82e6d240 r6:85896a00 r5:00000038
r4:89e8b600
[<815e32c8>] (unix_bpf_recvmsg) from [<815e2758>] (unix_dgram_recvmsg+0x38/0x4c net/unix/af_unix.c:2457)
r10:eb215d4c r9:00000000 r8:00000000 r7:00000000 r6:848e3680 r5:eb215ed8
r4:815e32c8
[<815e2720>] (unix_dgram_recvmsg) from [<81340208>] (sock_recvmsg_nosec net/socket.c:1027 [inline])
[<815e2720>] (unix_dgram_recvmsg) from [<81340208>] (sock_recvmsg+0x50/0x78 net/socket.c:1049)
r4:815e2720
[<813401b8>] (sock_recvmsg) from [<8134040c>] (____sys_recvmsg+0x90/0x158 net/socket.c:2760)
r7:00000000 r6:20000500 r5:848e3680 r4:eb215ed8
[<8134037c>] (____sys_recvmsg) from [<81342f58>] (___sys_recvmsg+0x88/0xbc net/socket.c:2802)
r10:00000001 r9:82e6d240 r8:848e3680 r7:00000000 r6:20000500 r5:eb215ed8
r4:00000000
[<81342ed0>] (___sys_recvmsg) from [<81343080>] (do_recvmmsg+0xf4/0x298 net/socket.c:2896)
r8:00000000 r7:00000000 r6:00000000 r5:20000500 r4:eb215eb8
[<81342f8c>] (do_recvmmsg) from [<81343a50>] (__sys_recvmmsg net/socket.c:2975 [inline])
[<81342f8c>] (do_recvmmsg) from [<81343a50>] (__do_sys_recvmmsg_time32 net/socket.c:3009 [inline])
[<81342f8c>] (do_recvmmsg) from [<81343a50>] (sys_recvmmsg_time32+0xc4/0xd8 net/socket.c:3002)
r10:0000016d r9:82e6d240 r8:00000001 r7:00000000 r6:00000000 r5:20000500
r4:00000003
[<8134398c>] (sys_recvmmsg_time32) from [<80200060>] (ret_fast_syscall+0x0/0x1c arch/arm/mm/proc-v7.S:66)
Exception stack(0xeb215fa8 to 0xeb215ff0)
5fa0: 00000000 00000000 00000003 20000500 00000001 00000000
5fc0: 00000000 00000000 0014c2c8 0000016d 7ead532e 7ead532f 003d0f00 76bf20fc
5fe0: 76bf1f08 76bf1ef8 00016688 000509e0
r8:80200288 r7:0000016d r6:0014c2c8 r5:00000000 r4:00000000
Code: eaffffe8 e1a0c00d e92dd800 e24cb004 (e5901000)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: eaffffe8 b 0xffffffa8
4: e1a0c00d mov ip, sp
8: e92dd800 push {fp, ip, lr, pc}
c: e24cb004 sub fp, ip, #4
* 10: e5901000 ldr r1, [r0] <-- trapping instruction


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jan 2, 2024, 6:09:22 AMJan 2
to ak...@linux-foundation.org, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 610a9b8f49fb Linux 6.7-rc8
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=101fdde9e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c1d9baf5d2241e14
dashboard link: https://syzkaller.appspot.com/bug?extid=b18872ea9631b5dcef3b
compiler: arm-linux-gnueabi-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17a75c19e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1507d95ee80000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/8ead8862021c/non_bootable_disk-610a9b8f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5dcc5fecebbd/vmlinux-610a9b8f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ac6cb620d377/zImage-610a9b8f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b18872...@syzkaller.appspotmail.com

8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
[00000000] *pgd=843b7003, *pmd=fe1bc003
Internal error: Oops: 207 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 2985 Comm: syz-executor305 Not tainted 6.7.0-rc8-syzkaller #0
Hardware name: ARM-Versatile Express
PC is at page_zonenum include/linux/mmzone.h:1109 [inline]
PC is at __kmap_local_page_prot+0xc/0x74 mm/highmem.c:573
LR is at kmap_local_page include/linux/highmem-internal.h:73 [inline]
LR is at copy_page_to_iter+0xf8/0x184 lib/iov_iter.c:379
pc : [<8046aab0>] lr : [<807e0b68>] psr: 60000013
sp : df959c20 ip : df959c30 fp : df959c2c
r10: 00000018 r9 : 828574e8 r8 : 00000000
r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 8455ec00
r3 : 00c00000 r2 : 0000071f r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 30c5387d Table: 8433f6c0 DAC: fffffffd
Register r0 information: NULL pointer
Register r1 information: NULL pointer
Register r2 information: non-paged memory
Register r3 information: non-paged memory
Register r4 information: slab kmalloc-1k start 8455ec00 pointer offset 0 size 1024
Register r5 information: NULL pointer
Register r6 information: NULL pointer
Register r7 information: NULL pointer
Register r8 information: NULL pointer
Register r9 information: non-slab/vmalloc memory
Register r10 information: non-paged memory
Register r11 information: 2-page vmalloc region starting at 0xdf958000 allocated at kernel_clone+0xac/0x41c kernel/fork.c:2907
Register r12 information: 2-page vmalloc region starting at 0xdf958000 allocated at kernel_clone+0xac/0x41c kernel/fork.c:2907
Process syz-executor305 (pid: 2985, stack limit = 0xdf958000)
Stack: (0xdf959c20 to 0xdf95a000)
9c20: df959c64 df959c30 807e0b68 8046aab0 df959c54 df959ef0 8024c5d8 8455ec00
9c40: 8455ec00 00000000 00000000 00000000 00000041 00000018 df959cb4 df959c68
9c60: 813da83c 807e0a7c 00000000 8423cd40 83a75600 83a756d0 83eaf300 83a756d8
9c80: df959ef0 00000000 806d5054 83eaf300 00000041 83a75600 82e96000 00000000
9ca0: 00000000 00000000 df959d24 df959cb8 815f77dc 813da758 00000000 df959ee0
9cc0: 00000000 00000000 00000000 00000000 83eaf3a8 83a756ec 83eaf53c df959ee0
9ce0: df959ee0 830a6780 00000000 00000000 00000000 97d26d6f df959d24 815f768c
9d00: 830a6780 20000d60 815f6ae4 00000000 00000000 df959d54 df959d44 df959d28
9d20: 815f6b1c 815f7698 00000000 830a6780 20000d40 df959ee0 df959e04 df959d48
9d40: 8134fd4c 815f6af0 00000000 00000000 00000001 00000000 00000000 00000000
9d60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9d80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9da0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9dc0: 00000000 00000000 00000000 00000000 00000000 97d26d6f 00000000 00000000
9de0: df959ee0 20000d60 00000000 830a6780 82e96000 00000002 df959e84 df959e08
9e00: 81352bdc 8134fc24 00000000 00000001 00000000 00000000 00000000 20000500
9e20: 00000041 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9e40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 97d26d6f
9e60: df959e84 df959ec0 20000d60 00000001 00000000 00000000 df959f5c df959e88
9e80: 81352d04 81352b60 00000001 df959e98 8089202c 830a6780 00000000 00000000
9ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9ec0: 00000000 00000000 0002eb00 00000000 00000000 00000000 2f2e0001 656c6966
9ee0: df959d54 00000000 00000000 00000000 00000000 00000000 20000500 00000041
9f00: 00000001 00000000 00000000 00000001 00000000 00000000 00000000 00000000
9f20: 00000000 00000000 00000176 97d26d6f 82e96000 00000003 20000d40 00000000
9f40: 00000000 00000002 82e96000 0000016d df959fa4 df959f60 813536d4 81352c1c
9f60: 00000000 ffffffff 00000000 00000000 00000000 00000000 82e96000 97d26d6f
9f80: df959fa4 00000000 00000000 0008e060 0000016d 80200288 00000000 df959fa8
9fa0: 80200060 8135361c 00000000 00000000 00000003 20000d40 00000002 00000000
9fc0: 00000000 00000000 0008e060 0000016d 0007107c 00000000 00000001 20000100
9fe0: 7ebf3c70 7ebf3c60 0001094c 0002eb00 00000010 00000003 00000000 00000000
Backtrace:
[<8046aaa4>] (__kmap_local_page_prot) from [<807e0b68>] (kmap_local_page include/linux/highmem-internal.h:73 [inline])
[<8046aaa4>] (__kmap_local_page_prot) from [<807e0b68>] (copy_page_to_iter+0xf8/0x184 lib/iov_iter.c:379)
[<807e0a70>] (copy_page_to_iter) from [<813da83c>] (sk_msg_recvmsg+0xf0/0x3cc net/core/skmsg.c:437)
r10:00000018 r9:00000041 r8:00000000 r7:00000000 r6:00000000 r5:8455ec00
r4:8455ec00
[<813da74c>] (sk_msg_recvmsg) from [<815f77dc>] (unix_bpf_recvmsg net/unix/unix_bpf.c:73 [inline])
[<813da74c>] (sk_msg_recvmsg) from [<815f77dc>] (unix_bpf_recvmsg+0x150/0x444 net/unix/unix_bpf.c:50)
r10:00000000 r9:00000000 r8:00000000 r7:82e96000 r6:83a75600 r5:00000041
r4:83eaf300
[<815f768c>] (unix_bpf_recvmsg) from [<815f6b1c>] (unix_dgram_recvmsg+0x38/0x4c net/unix/af_unix.c:2483)
r10:df959d54 r9:00000000 r8:00000000 r7:815f6ae4 r6:20000d60 r5:830a6780
r4:815f768c
[<815f6ae4>] (unix_dgram_recvmsg) from [<8134fd4c>] (sock_recvmsg_nosec net/socket.c:1044 [inline])
[<815f6ae4>] (unix_dgram_recvmsg) from [<8134fd4c>] (____sys_recvmsg+0x134/0x158 net/socket.c:2801)
r4:df959ee0
[<8134fc18>] (____sys_recvmsg) from [<81352bdc>] (___sys_recvmsg+0x88/0xbc net/socket.c:2845)
r10:00000002 r9:82e96000 r8:830a6780 r7:00000000 r6:20000d60 r5:df959ee0
r4:00000000
[<81352b54>] (___sys_recvmsg) from [<81352d04>] (do_recvmmsg+0xf4/0x298 net/socket.c:2939)
r8:00000000 r7:00000000 r6:00000001 r5:20000d60 r4:df959ec0
[<81352c10>] (do_recvmmsg) from [<813536d4>] (__sys_recvmmsg net/socket.c:3018 [inline])
[<81352c10>] (do_recvmmsg) from [<813536d4>] (__do_sys_recvmmsg_time32 net/socket.c:3052 [inline])
[<81352c10>] (do_recvmmsg) from [<813536d4>] (sys_recvmmsg_time32+0xc4/0xd8 net/socket.c:3045)
r10:0000016d r9:82e96000 r8:00000002 r7:00000000 r6:00000000 r5:20000d40
r4:00000003
[<81353610>] (sys_recvmmsg_time32) from [<80200060>] (ret_fast_syscall+0x0/0x1c arch/arm/mm/proc-v7.S:66)
Exception stack(0xdf959fa8 to 0xdf959ff0)
9fa0: 00000000 00000000 00000003 20000d40 00000002 00000000
9fc0: 00000000 00000000 0008e060 0000016d 0007107c 00000000 00000001 20000100
9fe0: 7ebf3c70 7ebf3c60 0001094c 0002eb00
r8:80200288 r7:0000016d r6:0008e060 r5:00000000 r4:00000000
Code: eaffffe8 e1a0c00d e92dd800 e24cb004 (e5901000)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: eaffffe8 b 0xffffffa8
4: e1a0c00d mov ip, sp
8: e92dd800 push {fp, ip, lr, pc}
c: e24cb004 sub fp, ip, #4
* 10: e5901000 ldr r1, [r0] <-- trapping instruction


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages