Re: WARNING in smc_unhash_sk

2018-06-11 Thread Davide Caratti
On Fri, 2018-06-08 at 09:53 +0200, Dmitry Vyukov wrote:
> On Tue, Feb 27, 2018 at 1:23 PM, Davide Caratti  wrote:
> > On Fri, 2018-02-23 at 07:59 -0800, syzbot wrote:
> > > Hello,
> > > 
> > > syzbot hit the following crash on upstream commit
> > > 

...

> > 
> > #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
> > master
> 
> 
> Hi Davide,
> 
> Any progress on this?
> 

hi Dmitry,

I'm not working on this bug at all. The mail above was an attempt to test
commit a5dcb73b96a9 ("net/smc: fix NULL pointer dereference on
sock_create_kern() error path"), where I replied to the wrong syzbot
message. Since a single error was not enough, I also put netdev in CC:
sorry for the spam :)

regards,
-- 
davide



Re: WARNING in smc_unhash_sk

2018-02-27 Thread Davide Caratti
On Fri, 2018-02-23 at 07:59 -0800, syzbot wrote:
> Hello,
> 
> syzbot hit the following crash on upstream commit
> af3e79d29555b97dd096e2f8e36a0f50213808a8 (Tue Feb 20 18:05:02 2018 +)
> Merge tag 'leds_for-4.16-rc3' of  
> git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
> 
> So far this crash happened 27 times on  
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/master,  
> net-next, upstream.
> C reproducer is attached.
> syzkaller reproducer is attached.
> Raw console output is attached.
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached.
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+3a0748c8f2f210c0e...@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.
> 
> WARNING: CPU: 1 PID: 9921 at ./include/net/sock.h:638 sk_del_node_init  
> include/net/sock.h:638 [inline]
> WARNING: CPU: 1 PID: 9921 at ./include/net/sock.h:638  
> smc_unhash_sk+0x335/0x450 net/smc/af_smc.c:90
> Kernel panic - not syncing: panic_on_warn set ...
> 
> CPU: 1 PID: 9921 Comm: syzkaller089677 Not tainted 4.16.0-rc2+ #324
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
> Google 01/01/2011
> 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
>   __warn+0x1dc/0x200 kernel/panic.c:547
>   report_bug+0x211/0x2d0 lib/bug.c:184
>   fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
>   fixup_bug arch/x86/kernel/traps.c:247 [inline]
>   do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
>   do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
>   invalid_op+0x58/0x80 arch/x86/entry/entry_64.S:957
> RIP: 0010:sk_del_node_init include/net/sock.h:638 [inline]
> RIP: 0010:smc_unhash_sk+0x335/0x450 net/smc/af_smc.c:90
> RSP: 0018:8801b639f198 EFLAGS: 00010293
> RAX: 8801b684a340 RBX: 110036c73e37 RCX: 85a3f1f5
> RDX:  RSI: dc00 RDI: 110036c73e3b
> RBP: 8801b639f280 R08: dc00 R09: 0004
> R10: 8801b639f050 R11: 0004 R12: 8801b639f258
> R13: 87669b40 R14: 8801c08d57c0 R15: 110036c73e3b
>   smc_release+0x321/0x580 net/smc/af_smc.c:148
>   sock_release+0x8d/0x1e0 net/socket.c:595
>   sock_close+0x16/0x20 net/socket.c:1149
>   __fput+0x327/0x7e0 fs/file_table.c:209
>   fput+0x15/0x20 fs/file_table.c:243
>   task_work_run+0x199/0x270 kernel/task_work.c:113
>   exit_task_work include/linux/task_work.h:22 [inline]
>   do_exit+0x9bb/0x1ad0 kernel/exit.c:865
>   do_group_exit+0x149/0x400 kernel/exit.c:968
>   get_signal+0x73a/0x16d0 kernel/signal.c:2469
>   do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
>   exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
>   prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
>   syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
>   do_syscall_64+0x6e5/0x940 arch/x86/entry/common.c:292
>   entry_SYSCALL_64_after_hwframe+0x42/0xb7
> RIP: 0033:0x44cad9
> RSP: 002b:7fbf24687ce8 EFLAGS: 0246 ORIG_RAX: 0007
> RAX: 0001 RBX: 00700024 RCX: 0044cad9
> RDX:  RSI: 0001 RDI: 2080
> RBP: 00700020 R08:  R09: 
> R10:  R11: 0246 R12: 
> R13: 0080ef3f R14: 7fbf246889c0 R15: 0005
> 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 syzkal...@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
> If you want to test a patch for this bug, please reply with:
> #syz test: git://repo/address.git branch
> and provide the patch inline or as an attachment.
> 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.

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
master
From c258bf3ad07985eaf4e07d7667b7882cb9a2661b Mon Sep 17 00:00:00 2001
Message-Id: 
From: Davide Caratti 
Date: Tue, 27 Feb 2018 12:45:11 +0100
Subject: [PATCH net] af_smc: fix NULL pointer