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

4 views
Skip to first unread message

syzbot

unread,
Aug 31, 2021, 8:19:29 PM8/31/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e23d55af0e1f Linux 4.19.205
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1652d635300000
kernel config: https://syzkaller.appspot.com/x/.config?x=2221dd564152b412
dashboard link: https://syzkaller.appspot.com/bug?extid=d340c230601477e0e083
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

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

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

==================================================================
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 jre...@yaina.de
x_tables: duplicate underflow at hook 2
ax25_connect(): syz-executor.1 uses autobind, please contact jre...@yaina.de
ax25_connect(): syz-executor.4 uses autobind, please contact jre...@yaina.de
ax25_connect(): syz-executor.4 uses autobind, please contact jre...@yaina.de


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

syzbot

unread,
Dec 29, 2021, 7:19:19 PM12/29/21
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages