KASAN: out-of-bounds Read in rds_cong_queue_updates

4 views
Skip to first unread message

syzbot

unread,
Mar 19, 2018, 12:59:06 AM3/19/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot hit the following crash on upstream commit
9e1909b9da04fb582b20d3805e16fad3f6ebf984 (Sun Mar 18 19:03:15 2018 +0000)
Merge branch 'x86-pti-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Unfortunately, I don't have any reproducer for this crash yet.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.
CC: [da...@davemloft.net linux-...@vger.kernel.org
linux...@vger.kernel.org net...@vger.kernel.org rds-...@oss.oracle.com
santosh....@oracle.com]

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+04370f...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

==================================================================
BUG: KASAN: out-of-bounds in __read_once_size include/linux/compiler.h:188
[inline]
BUG: KASAN: out-of-bounds in atomic_read arch/x86/include/asm/atomic.h:27
[inline]
BUG: KASAN: out-of-bounds in refcount_read include/linux/refcount.h:42
[inline]
BUG: KASAN: out-of-bounds in check_net include/net/net_namespace.h:228
[inline]
BUG: KASAN: out-of-bounds in rds_destroy_pending net/rds/rds.h:868 [inline]
BUG: KASAN: out-of-bounds in rds_cong_queue_updates+0x4d3/0x4f0
net/rds/cong.c:226
Read of size 4 at addr ffff8801b3632104 by task kworker/u4:0/5

CPU: 0 PID: 5 Comm: kworker/u4:0 Not tainted 4.16.0-rc5+ #358
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: krdsd rds_send_worker
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x24d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x23c/0x360 mm/kasan/report.c:412
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432
__read_once_size include/linux/compiler.h:188 [inline]
atomic_read arch/x86/include/asm/atomic.h:27 [inline]
refcount_read include/linux/refcount.h:42 [inline]
check_net include/net/net_namespace.h:228 [inline]
rds_destroy_pending net/rds/rds.h:868 [inline]
rds_cong_queue_updates+0x4d3/0x4f0 net/rds/cong.c:226
rds_recv_rcvbuf_delta.part.2+0x289/0x320 net/rds/recv.c:118
rds_recv_rcvbuf_delta net/rds/recv.c:377 [inline]
rds_recv_incoming+0xeb4/0x11d0 net/rds/recv.c:377
rds_loop_xmit+0x149/0x320 net/rds/loop.c:82
rds_send_xmit+0xbcd/0x26b0 net/rds/send.c:355
rds_send_worker+0x115/0x2a0 net/rds/threads.c:199
process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113
worker_thread+0x223/0x1990 kernel/workqueue.c:2247
kthread+0x33c/0x400 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406

The buggy address belongs to the page:
page:ffffea0006cd8c80 count:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 0000000000000000 00000001ffffffff
raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8801b3632000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8801b3632080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8801b3632100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff8801b3632180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8801b3632200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 5 Comm: kworker/u4:0 Tainted: G B 4.16.0-rc5+ #358
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: krdsd rds_send_worker
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x24d lib/dump_stack.c:53
panic+0x1e4/0x41c kernel/panic.c:183
kasan_end_report+0x50/0x50 mm/kasan/report.c:180
kasan_report_error mm/kasan/report.c:359 [inline]
kasan_report+0x149/0x360 mm/kasan/report.c:412
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432
__read_once_size include/linux/compiler.h:188 [inline]
atomic_read arch/x86/include/asm/atomic.h:27 [inline]
refcount_read include/linux/refcount.h:42 [inline]
check_net include/net/net_namespace.h:228 [inline]
rds_destroy_pending net/rds/rds.h:868 [inline]
rds_cong_queue_updates+0x4d3/0x4f0 net/rds/cong.c:226
rds_recv_rcvbuf_delta.part.2+0x289/0x320 net/rds/recv.c:118
rds_recv_rcvbuf_delta net/rds/recv.c:377 [inline]
rds_recv_incoming+0xeb4/0x11d0 net/rds/recv.c:377
rds_loop_xmit+0x149/0x320 net/rds/loop.c:82
rds_send_xmit+0xbcd/0x26b0 net/rds/send.c:355
rds_send_worker+0x115/0x2a0 net/rds/threads.c:199
process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113
worker_thread+0x223/0x1990 kernel/workqueue.c:2247
kthread+0x33c/0x400 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream
raw.log.txt
config.txt

Dmitry Vyukov

unread,
Mar 19, 2018, 2:27:10 AM3/19/18
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
Looks like a dup of other OOB/UAF in rds_cong_queue_updates. These are
already upstream and this version happened just once, so let's not
bother upstream:

#syz invalid
> --
> 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/001a1141bf3617dc4d0567bcd173%40google.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages