syzbot


KASAN: stack-out-of-bounds Read in ax25_addr_build

Status: auto-closed as invalid on 2021/12/30 00:19
Reported-by: syzbot+d340c230601477e0e083@syzkaller.appspotmail.com
First crash: 969d, last: 969d

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in memcpy include/linux/string.h:377 [inline]
BUG: KASAN: stack-out-of-bounds in ax25_addr_build+0x277/0x400 net/ax25/ax25_addr.c:256
Read of size 7 at addr ffff88822a237c5f by task syz-executor.2/2494

CPU: 1 PID: 2494 Comm: syz-executor.2 Not tainted 4.19.205-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
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+0x8f/0xa0 mm/kasan/report.c:412
 memcpy+0x20/0x50 mm/kasan/kasan.c:302
 memcpy include/linux/string.h:377 [inline]
 ax25_addr_build+0x277/0x400 net/ax25/ax25_addr.c:256
 ax25_sendmsg+0xc57/0x10b0 net/ax25/af_ax25.c:1603
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 __sys_sendto+0x21a/0x320 net/socket.c:1897
 __do_sys_sendto net/socket.c:1909 [inline]
 __se_sys_sendto net/socket.c:1905 [inline]
 __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1905
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3a4072c188 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00000000004bfcc4 R08: 00000000200002c0 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffdd5ead97f R14: 00007f3a4072c300 R15: 0000000000022000

The buggy address belongs to the page:
page:ffffea0008a88dc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x57ff00000000000()
raw: 057ff00000000000 0000000000000000 ffffffff00000101 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88822a237b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88822a237b80: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2
>ffff88822a237c00: 00 00 f2 f2 00 00 00 00 00 00 00 00 02 f3 f3 f3
                                                       ^
 ffff88822a237c80: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88822a237d00: 00 00 00 f1 f1 f1 f1 04 f2 04 f2 00 00 f2 f2 00
==================================================================
x_tables: duplicate underflow at hook 2
ax25_connect(): syz-executor.1 uses autobind, please contact jreuter@yaina.de
x_tables: duplicate underflow at hook 2
ax25_connect(): syz-executor.1 uses autobind, please contact jreuter@yaina.de
ax25_connect(): syz-executor.4 uses autobind, please contact jreuter@yaina.de
ax25_connect(): syz-executor.4 uses autobind, please contact jreuter@yaina.de

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/01 00:18 linux-4.19.y e23d55af0e1f 7eb7e152 .config console log report info ci2-linux-4-19 KASAN: stack-out-of-bounds Read in ax25_addr_build
* Struck through repros no longer work on HEAD.