KASAN: null-ptr-deref Read in refcount_inc_not_zero_checked

5 views
Skip to first unread message

syzbot

unread,
Jun 3, 2019, 3:02:09 PM6/3/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: e8d67fa5 net: dsa: sja1105: Don't store frame type in skb-..
git tree: net
console output: https://syzkaller.appspot.com/x/log.txt?x=109bb092a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=4f721a391cd46ea
dashboard link: https://syzkaller.appspot.com/bug?extid=df4d88699003167ae305
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [da...@davemloft.net kuz...@ms2.inr.ac.ru
linux-...@vger.kernel.org net...@vger.kernel.org yosh...@linux-ipv6.org
net...@vger.kernel.org]

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

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

==================================================================
BUG: KASAN: null-ptr-deref in atomic_read
include/asm-generic/atomic-instrumented.h:26 [inline]
BUG: KASAN: null-ptr-deref in refcount_inc_not_zero_checked+0x81/0x200
lib/refcount.c:123
Read of size 4 at addr 000000000000004a by task syz-executor.2/29310

CPU: 1 PID: 29310 Comm: syz-executor.2 Not tainted 5.2.0-rc2+ #36
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+0x172/0x1f0 lib/dump_stack.c:113
__kasan_report.cold+0x5/0x40 mm/kasan/report.c:321
kasan_report+0x12/0x20 mm/kasan/common.c:614
check_memory_region_inline mm/kasan/generic.c:185 [inline]
check_memory_region+0x123/0x190 mm/kasan/generic.c:191
kasan_check_read+0x11/0x20 mm/kasan/common.c:94
atomic_read include/asm-generic/atomic-instrumented.h:26 [inline]
refcount_inc_not_zero_checked+0x81/0x200 lib/refcount.c:123
ipv4_neigh_lookup+0x44e/0x1590 net/ipv4/route.c:454
dst_neigh_lookup_skb include/net/dst.h:401 [inline]
__neigh_update+0xba7/0x2570 net/core/neighbour.c:1383
neigh_update+0x37/0x50 net/core/neighbour.c:1416
arp_req_set+0x2e7/0x720 net/ipv4/arp.c:1072
arp_ioctl+0x652/0x7f0 net/ipv4/arp.c:1230
inet_ioctl+0x2a0/0x340 net/ipv4/af_inet.c:930
sock_do_ioctl+0xd8/0x2f0 net/socket.c:1049
sock_ioctl+0x3ed/0x780 net/socket.c:1200
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:509 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:696
ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
__do_sys_ioctl fs/ioctl.c:720 [inline]
__se_sys_ioctl fs/ioctl.c:718 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459279
Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f1974a3fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459279
RDX: 0000000020000240 RSI: 0000000000008955 RDI: 0000000000000006
RBP: 000000000075bfc0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1974a406d4
R13: 00000000004c4c41 R14: 00000000004d8958 R15: 00000000ffffffff
==================================================================


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Dmitry Vyukov

unread,
Jun 4, 2019, 1:08:39 AM6/4/19
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
FTR, we should skip refcount_ functions in reports.
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/0000000000003a3d21058a70008f%40google.com.

Dmitry Vyukov

unread,
Jun 4, 2019, 2:56:04 AM6/4/19
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
It will reappear under a different name:
https://github.com/google/syzkaller/commit/61f5c63922f581ed7cd2185eabb9cb540c4ca96a

#syz invalid
Reply all
Reply to author
Forward
0 new messages