All of lore.kernel.org
 help / color / mirror / Atom feed
* KASAN: null-ptr-deref Read in refcount_sub_and_test_checked (2)
@ 2018-11-14  7:18 syzbot
  2019-03-21 17:39 ` syzbot
  2019-12-07  1:30 ` syzbot
  0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2018-11-14  7:18 UTC (permalink / raw)
  To: kyungmin.park, linux-kernel, linux-media, m.szyprowski, mchehab,
	pawel, syzkaller-bugs

Hello,

syzbot found the following crash on:

HEAD commit:    ccda4af0f4b9 Linux 4.20-rc2
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16f9cb0b400000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4a0a89f12ca9b0f5
dashboard link: https://syzkaller.appspot.com/bug?extid=0468b73bdbb243217224
compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16d20893400000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=118f5a2b400000

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

==================================================================
BUG: KASAN: null-ptr-deref in atomic_read  
include/asm-generic/atomic-instrumented.h:21 [inline]
BUG: KASAN: null-ptr-deref in refcount_sub_and_test_checked+0x9d/0x310  
lib/refcount.c:179
Read of size 4 at addr 0000000000000020 by task syz-executor487/6051

CPU: 0 PID: 6051 Comm: syz-executor487 Not tainted 4.20.0-rc2+ #333
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+0x244/0x39d lib/dump_stack.c:113
  kasan_report_error mm/kasan/report.c:352 [inline]
  kasan_report.cold.8+0x6d/0x309 mm/kasan/report.c:412
  check_memory_region_inline mm/kasan/kasan.c:260 [inline]
  check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
  kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
  atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
  refcount_sub_and_test_checked+0x9d/0x310 lib/refcount.c:179
  refcount_dec_and_test_checked+0x1a/0x20 lib/refcount.c:212
  vb2_vmalloc_put+0x19/0x80  
drivers/media/common/videobuf2/videobuf2-vmalloc.c:68
  __vb2_buf_mem_free+0x112/0x210  
drivers/media/common/videobuf2/videobuf2-core.c:242
  __vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:413 [inline]
  __vb2_queue_free+0x830/0xa30  
drivers/media/common/videobuf2/videobuf2-core.c:458
  vb2_core_queue_release+0x62/0x80  
drivers/media/common/videobuf2/videobuf2-core.c:2231
  vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:837  
[inline]
  _vb2_fop_release+0x1d2/0x2b0  
drivers/media/common/videobuf2/videobuf2-v4l2.c:1010
  vb2_fop_release+0x77/0xc0  
drivers/media/common/videobuf2/videobuf2-v4l2.c:1024
  vivid_fop_release+0x18e/0x440 drivers/media/platform/vivid/vivid-core.c:474
  v4l2_release+0x224/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:456
  __fput+0x385/0xa30 fs/file_table.c:278
  ____fput+0x15/0x20 fs/file_table.c:309
  task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
  exit_task_work include/linux/task_work.h:22 [inline]
  do_exit+0x1ad6/0x26d0 kernel/exit.c:867
  do_group_exit+0x177/0x440 kernel/exit.c:970
  __do_sys_exit_group kernel/exit.c:981 [inline]
  __se_sys_exit_group kernel/exit.c:979 [inline]
  __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:979
  do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x442c78
Code: Bad RIP value.
RSP: 002b:00007fff4ac5a278 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442c78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c2848 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d4180 R14: 0000000000000000 R15: 0000000000000000
==================================================================


---
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 syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with  
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: KASAN: null-ptr-deref Read in refcount_sub_and_test_checked (2)
  2018-11-14  7:18 KASAN: null-ptr-deref Read in refcount_sub_and_test_checked (2) syzbot
@ 2019-03-21 17:39 ` syzbot
  2019-12-07  1:30 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2019-03-21 17:39 UTC (permalink / raw)
  To: kyungmin.park, linux-kernel, linux-media, m.szyprowski, mchehab,
	pawel, syzkaller-bugs

Bisection is inconclusive: the bug happens on the oldest tested release.

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=13b0323b200000
start commit:   [unknown
git tree:       upstream
final crash:    https://syzkaller.appspot.com/x/report.txt?x=1070323b200000
console output: https://syzkaller.appspot.com/x/log.txt?x=17b0323b200000
dashboard link: https://syzkaller.appspot.com/bug?extid=0468b73bdbb243217224
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16d20893400000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=118f5a2b400000

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: KASAN: null-ptr-deref Read in refcount_sub_and_test_checked (2)
  2018-11-14  7:18 KASAN: null-ptr-deref Read in refcount_sub_and_test_checked (2) syzbot
  2019-03-21 17:39 ` syzbot
@ 2019-12-07  1:30 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2019-12-07  1:30 UTC (permalink / raw)
  To: hverkuil-cisco, kyungmin.park, linux-kernel, linux-media,
	m.szyprowski, mchehab+samsung, mchehab, pawel, syzkaller-bugs,
	tfiga

syzbot suspects this bug was fixed by commit:

commit 62dcb4f41836bd3c44b5b651bb6df07ea4cb1551
Author: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date:   Thu Nov 8 12:23:37 2018 +0000

     media: vb2: check memory model for VIDIOC_CREATE_BUFS

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14972e41e00000
start commit:   ccda4af0 Linux 4.20-rc2
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=4a0a89f12ca9b0f5
dashboard link: https://syzkaller.appspot.com/bug?extid=0468b73bdbb243217224
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16d20893400000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=118f5a2b400000

If the result looks correct, please mark the bug fixed by replying with:

#syz fix: media: vb2: check memory model for VIDIOC_CREATE_BUFS

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-07  1:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14  7:18 KASAN: null-ptr-deref Read in refcount_sub_and_test_checked (2) syzbot
2019-03-21 17:39 ` syzbot
2019-12-07  1:30 ` syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.