Hello,
syzbot found the following issue on:
HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=17dcd10c480000
kernel config:
https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link:
https://syzkaller.appspot.com/bug?extid=92ae71b4e89291da528e
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=16c230ec480000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=16d24392480000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/97b7f37edfbe/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+92ae71...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-out-of-bounds in dbAllocDmapLev+0x2e0/0x330 fs/jfs/jfs_dmap.c:2022
Read of size 1 at addr ffff888098d36fcd by task syz-executor110/8115
CPU: 0 PID: 8115 Comm: syz-executor110 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report mm/kasan/report.c:412 [inline]
__asan_report_load1_noabort+0x88/0x90 mm/kasan/report.c:430
dbAllocDmapLev+0x2e0/0x330 fs/jfs/jfs_dmap.c:2022
dbAllocCtl+0x4a2/0x700 fs/jfs/jfs_dmap.c:1866
dbAllocAG+0x7d1/0xb90 fs/jfs/jfs_dmap.c:1407
dbAlloc+0x472/0xb00 fs/jfs/jfs_dmap.c:863
dtSplitUp+0x365/0x4e70 fs/jfs/jfs_dtree.c:987
dtInsert+0x7fd/0xa00 fs/jfs/jfs_dtree.c:876
jfs_create.part.0+0x3c6/0x880 fs/jfs/namei.c:150
jfs_create+0x3f/0x60 fs/jfs/namei.c:90
lookup_open+0x893/0x1a20 fs/namei.c:3235
do_last fs/namei.c:3327 [inline]
path_openat+0x1094/0x2df0 fs/namei.c:3537
do_filp_open+0x18c/0x3f0 fs/namei.c:3567
do_sys_open+0x3b3/0x520 fs/open.c:1085
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f2e9a3f87e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcf416d9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2e9a3f87e9
RDX: 000000000000275a RSI: 0000000020000040 RDI: 00000000ffffff9c
RBP: 00007f2e9a3b8080 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2e9a3b8110
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 8091:
kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
skb_clone+0x151/0x3d0 net/core/skbuff.c:1293
dev_queue_xmit_nit+0x326/0xa20 net/core/dev.c:2018
xmit_one net/core/dev.c:3252 [inline]
dev_hard_start_xmit+0xaa/0x920 net/core/dev.c:3272
sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332
qdisc_restart net/sched/sch_generic.c:395 [inline]
__qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403
qdisc_run include/net/pkt_sched.h:120 [inline]
__dev_xmit_skb net/core/dev.c:3451 [inline]
__dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807
neigh_hh_output include/net/neighbour.h:491 [inline]
neigh_output include/net/neighbour.h:499 [inline]
ip_finish_output2+0xb6d/0x15a0 net/ipv4/ip_output.c:230
ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406
dst_output include/net/dst.h:455 [inline]
ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125
__ip_queue_xmit+0x91e/0x1c10 net/ipv4/ip_output.c:507
__tcp_transmit_skb+0x1b9c/0x3400 net/ipv4/tcp_output.c:1148
__tcp_send_ack.part.0+0x3d9/0x5c0 net/ipv4/tcp_output.c:3643
__tcp_send_ack net/ipv4/tcp_output.c:3649 [inline]
tcp_send_ack+0x7d/0xa0 net/ipv4/tcp_output.c:3649
tcp_cleanup_rbuf+0x30f/0x600 net/ipv4/tcp.c:1604
tcp_recvmsg+0xa8c/0x2a90 net/ipv4/tcp.c:2177
inet_recvmsg+0x124/0x5c0 net/ipv4/af_inet.c:830
sock_recvmsg_nosec net/socket.c:859 [inline]
sock_recvmsg net/socket.c:866 [inline]
sock_recvmsg net/socket.c:862 [inline]
sock_read_iter+0x339/0x470 net/socket.c:944
call_read_iter include/linux/fs.h:1815 [inline]
new_sync_read fs/read_write.c:406 [inline]
__vfs_read+0x518/0x750 fs/read_write.c:418
vfs_read+0x194/0x3c0 fs/read_write.c:452
ksys_read+0x12b/0x2a0 fs/read_write.c:579
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 8091:
__cache_free mm/slab.c:3503 [inline]
kmem_cache_free+0x7f/0x260 mm/slab.c:3765
kfree_skbmem+0xc1/0x140 net/core/skbuff.c:595
__kfree_skb net/core/skbuff.c:655 [inline]
consume_skb+0x120/0x3d0 net/core/skbuff.c:714
packet_rcv+0xea/0x1490 net/packet/af_packet.c:2148
dev_queue_xmit_nit+0x756/0xa20 net/core/dev.c:2050
xmit_one net/core/dev.c:3252 [inline]
dev_hard_start_xmit+0xaa/0x920 net/core/dev.c:3272
sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332
qdisc_restart net/sched/sch_generic.c:395 [inline]
__qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403
qdisc_run include/net/pkt_sched.h:120 [inline]
__dev_xmit_skb net/core/dev.c:3451 [inline]
__dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807
neigh_hh_output include/net/neighbour.h:491 [inline]
neigh_output include/net/neighbour.h:499 [inline]
ip_finish_output2+0xb6d/0x15a0 net/ipv4/ip_output.c:230
ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406
dst_output include/net/dst.h:455 [inline]
ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125
__ip_queue_xmit+0x91e/0x1c10 net/ipv4/ip_output.c:507
__tcp_transmit_skb+0x1b9c/0x3400 net/ipv4/tcp_output.c:1148
__tcp_send_ack.part.0+0x3d9/0x5c0 net/ipv4/tcp_output.c:3643
__tcp_send_ack net/ipv4/tcp_output.c:3649 [inline]
tcp_send_ack+0x7d/0xa0 net/ipv4/tcp_output.c:3649
tcp_cleanup_rbuf+0x30f/0x600 net/ipv4/tcp.c:1604
tcp_recvmsg+0xa8c/0x2a90 net/ipv4/tcp.c:2177
inet_recvmsg+0x124/0x5c0 net/ipv4/af_inet.c:830
sock_recvmsg_nosec net/socket.c:859 [inline]
sock_recvmsg net/socket.c:866 [inline]
sock_recvmsg net/socket.c:862 [inline]
sock_read_iter+0x339/0x470 net/socket.c:944
call_read_iter include/linux/fs.h:1815 [inline]
new_sync_read fs/read_write.c:406 [inline]
__vfs_read+0x518/0x750 fs/read_write.c:418
vfs_read+0x194/0x3c0 fs/read_write.c:452
ksys_read+0x12b/0x2a0 fs/read_write.c:579
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff888098d36e40
which belongs to the cache skbuff_head_cache of size 232
The buggy address is located 165 bytes to the right of
232-byte region [ffff888098d36e40, ffff888098d36f28)
The buggy address belongs to the page:
page:ffffea0002634d80 count:1 mapcount:0 mapping:ffff8880b5b96900 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea0002ab7c08 ffffea0002821ec8 ffff8880b5b96900
raw: 0000000000000000 ffff888098d36080 000000010000000c 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888098d36e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888098d36f00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc
>ffff888098d36f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888098d37000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888098d37080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00