[syzbot] [bfs?] KASAN: null-ptr-deref Read in drop_buffers (2)

10 views
Skip to first unread message

syzbot

unread,
Aug 1, 2023, 6:44:50 PM8/1/23
to aivazia...@gmail.com, bra...@kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
Hello,

syzbot found the following issue on:

HEAD commit: ec8939156379 Add linux-next specific files for 20230731
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=161e3355a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=dc839eae61644ed
dashboard link: https://syzkaller.appspot.com/bug?extid=d285c6d0b23c6033d520
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/084b7f2f7900/disk-ec893915.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/279a4144b6d9/vmlinux-ec893915.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a21cf5ede096/bzImage-ec893915.xz

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

==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: null-ptr-deref in buffer_busy fs/buffer.c:2902 [inline]
BUG: KASAN: null-ptr-deref in drop_buffers.constprop.0+0x99/0x510 fs/buffer.c:2914
Read of size 4 at addr 0000000000000060 by task syz-executor.1/17034

CPU: 1 PID: 17034 Comm: syz-executor.1 Not tainted 6.5.0-rc4-next-20230731-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
kasan_report+0xda/0x110 mm/kasan/report.c:588
check_region_inline mm/kasan/generic.c:181 [inline]
kasan_check_range+0xef/0x190 mm/kasan/generic.c:187
instrument_atomic_read include/linux/instrumented.h:68 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
buffer_busy fs/buffer.c:2902 [inline]
drop_buffers.constprop.0+0x99/0x510 fs/buffer.c:2914
try_to_free_buffers+0x21b/0x2d0 fs/buffer.c:2944
filemap_release_folio+0x20f/0x270 mm/filemap.c:4089
shrink_folio_list+0x28bc/0x3dc0 mm/vmscan.c:2068
evict_folios+0x6bc/0x18f0 mm/vmscan.c:5181
try_to_shrink_lruvec+0x769/0xb00 mm/vmscan.c:5357
lru_gen_shrink_lruvec mm/vmscan.c:5494 [inline]
shrink_lruvec+0x314/0x2980 mm/vmscan.c:6269
shrink_node_memcgs mm/vmscan.c:6489 [inline]
shrink_node+0x807/0x3730 mm/vmscan.c:6524
shrink_zones mm/vmscan.c:6763 [inline]
do_try_to_free_pages+0x3cf/0x1990 mm/vmscan.c:6825
try_to_free_mem_cgroup_pages+0x36f/0x850 mm/vmscan.c:7140
try_charge_memcg+0x460/0x1400 mm/memcontrol.c:2692
obj_cgroup_charge_pages mm/memcontrol.c:3106 [inline]
__memcg_kmem_charge_page+0x179/0x3d0 mm/memcontrol.c:3132
__alloc_pages+0x1fc/0x4a0 mm/page_alloc.c:4529
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2292
vm_area_alloc_pages mm/vmalloc.c:3059 [inline]
__vmalloc_area_node mm/vmalloc.c:3135 [inline]
__vmalloc_node_range+0xa6e/0x1540 mm/vmalloc.c:3316
kvmalloc_node+0x14b/0x1a0 mm/util.c:629
kvmalloc include/linux/slab.h:737 [inline]
xt_alloc_table_info+0x3e/0xa0 net/netfilter/x_tables.c:1192
do_replace net/ipv6/netfilter/ip6_tables.c:1139 [inline]
do_ip6t_set_ctl+0x53c/0xbd0 net/ipv6/netfilter/ip6_tables.c:1636
nf_setsockopt+0x87/0xe0 net/netfilter/nf_sockopt.c:101
ipv6_setsockopt+0x12b/0x190 net/ipv6/ipv6_sockglue.c:1017
udpv6_setsockopt+0x7d/0xc0 net/ipv6/udp.c:1690
__sys_setsockopt+0x2ca/0x5b0 net/socket.c:2265
__do_sys_setsockopt net/socket.c:2276 [inline]
__se_sys_setsockopt net/socket.c:2273 [inline]
__x64_sys_setsockopt+0xbd/0x150 net/socket.c:2273
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0509e7cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f050aba80c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f0509f9bf80 RCX: 00007f0509e7cae9
RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003
RBP: 00007f0509ec847a R08: 00000000000003e0 R09: 0000000000000000
R10: 00000000200014c0 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f0509f9bf80 R15: 00007ffea4aa1d48
</TASK>
==================================================================


---
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 change 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,
Sep 12, 2023, 12:06:57 AM9/12/23
to aivazia...@gmail.com, bra...@kernel.org, jfs-dis...@lists.sourceforge.net, linux-...@vger.kernel.org, linux-...@vger.kernel.org, sha...@kernel.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
syzbot has found a reproducer for the following issue on:

HEAD commit: 0bb80ecc33a8 Linux 6.6-rc1
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=123943c8680000
kernel config: https://syzkaller.appspot.com/x/.config?x=df91a3034fe3f122
dashboard link: https://syzkaller.appspot.com/bug?extid=d285c6d0b23c6033d520
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13802378680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e15844680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dd8655c7bc5f/disk-0bb80ecc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4e170fb1db75/vmlinux-0bb80ecc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/88d7ab5b54cd/bzImage-0bb80ecc.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/0fc14e142a3d/mount_0.gz

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

find_entry called with index = 0
read_mapping_page failed!
ERROR: (device loop0): txCommit:
ERROR: (device loop0): remounting filesystem as read-only
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: null-ptr-deref in buffer_busy fs/buffer.c:2896 [inline]
BUG: KASAN: null-ptr-deref in drop_buffers+0x6f/0x700 fs/buffer.c:2908
Read of size 4 at addr 0000000000000060 by task syz-executor224/5036

CPU: 1 PID: 5036 Comm: syz-executor224 Not tainted 6.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
print_report+0xe6/0x540 mm/kasan/report.c:478
kasan_report+0x175/0x1b0 mm/kasan/report.c:588
kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187
instrument_atomic_read include/linux/instrumented.h:68 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
buffer_busy fs/buffer.c:2896 [inline]
drop_buffers+0x6f/0x700 fs/buffer.c:2908
try_to_free_buffers+0x295/0x5f0 fs/buffer.c:2938
shrink_folio_list+0x271a/0x8870 mm/vmscan.c:2068
shrink_inactive_list mm/vmscan.c:2614 [inline]
shrink_list mm/vmscan.c:2855 [inline]
shrink_lruvec+0x16e6/0x2d30 mm/vmscan.c:6319
shrink_node_memcgs mm/vmscan.c:6505 [inline]
shrink_node+0x1176/0x28c0 mm/vmscan.c:6540
shrink_zones mm/vmscan.c:6779 [inline]
do_try_to_free_pages+0x717/0x19e0 mm/vmscan.c:6841
try_to_free_mem_cgroup_pages+0x455/0xa50 mm/vmscan.c:7156
try_charge_memcg+0x5e1/0x16e0 mm/memcontrol.c:2691
obj_cgroup_charge_pages mm/memcontrol.c:3105 [inline]
__memcg_kmem_charge_page+0x21e/0x380 mm/memcontrol.c:3131
__alloc_pages+0x28b/0x670 mm/page_alloc.c:4443
__alloc_pages_node include/linux/gfp.h:237 [inline]
alloc_pages_node include/linux/gfp.h:260 [inline]
bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline]
bpf_ringbuf_alloc+0xcb/0x420 kernel/bpf/ringbuf.c:170
ringbuf_map_alloc+0x1d3/0x2f0 kernel/bpf/ringbuf.c:204
map_create+0x849/0x1040 kernel/bpf/syscall.c:1207
__sys_bpf+0x6a2/0x810 kernel/bpf/syscall.c:5317
__do_sys_bpf kernel/bpf/syscall.c:5439 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5437 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5437
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff75fb611c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 1a 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc0dbb0f28 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007ff75fb611c9
RDX: 0000000000000048 RSI: 0000000020000cc0 RDI: 0000000000000000
RBP: 00007ffc0dbb0f4c R08: ffffffffffffffff R09: ffffffffffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc0dbb0fa0
R13: 00007ffc0dbb0f60 R14: 000000000000cf31 R15: 0000000000000001
</TASK>
==================================================================


---
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