netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: syzbot <syzbot+0aabbccfb4ec7b744ffd@syzkaller.appspotmail.com>
To: akpm@linux-foundation.org, bp@alien8.de, davem@davemloft.net,
	hpa@zytor.com, jmattson@google.com, joro@8bytes.org,
	kuba@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, mark.rutland@arm.com,
	masahiroy@kernel.org, mingo@redhat.com, netdev@vger.kernel.org,
	pbonzini@redhat.com, peterz@infradead.org,
	rafael.j.wysocki@intel.com, rostedt@goodmis.org,
	seanjc@google.com, syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de, vkuznets@redhat.com, wanpengli@tencent.com,
	will@kernel.org, x86@kernel.org
Subject: [syzbot] WARNING: refcount bug in nfc_llcp_local_put
Date: Mon, 29 Mar 2021 08:53:26 -0700	[thread overview]
Message-ID: <000000000000d6689d05beaee1c9@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    75887e88 Merge branch '40GbE' of git://git.kernel.org/pub/..
git tree:       net
console output: https://syzkaller.appspot.com/x/log.txt?x=131a634ed00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5adab0bdee099d7a
dashboard link: https://syzkaller.appspot.com/bug?extid=0aabbccfb4ec7b744ffd
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15bcd6f6d00000

The issue was bisected to:

commit 997acaf6b4b59c6a9c259740312a69ea549cc684
Author: Mark Rutland <mark.rutland@arm.com>
Date:   Mon Jan 11 15:37:07 2021 +0000

    lockdep: report broken irq restoration

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=12279b4ed00000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=11279b4ed00000
console output: https://syzkaller.appspot.com/x/log.txt?x=16279b4ed00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0aabbccfb4ec7b744ffd@syzkaller.appspotmail.com
Fixes: 997acaf6b4b5 ("lockdep: report broken irq restoration")

------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 11133 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Modules linked in:
CPU: 1 PID: 11133 Comm: syz-executor.0 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Code: e9 db fe ff ff 48 89 df e8 fc ee ee fd e9 8a fe ff ff e8 42 44 ab fd 48 c7 c7 c0 d8 c1 89 c6 05 eb 44 e9 09 01 e8 7c 9b fc 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
RSP: 0018:ffffc900033f7b10 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888040038000 RSI: ffffffff815c4d15 RDI: fffff5200067ef54
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815bdaae R11: 0000000000000000 R12: 0000000000000000
R13: ffff88814429f018 R14: ffffffff8dab2ec0 R15: ffff888030b20d38
FS:  0000000001fa6400(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000540198 CR3: 00000000142c1000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __refcount_sub_and_test include/linux/refcount.h:283 [inline]
 __refcount_dec_and_test include/linux/refcount.h:315 [inline]
 refcount_dec_and_test include/linux/refcount.h:333 [inline]
 kref_put include/linux/kref.h:64 [inline]
 nfc_llcp_local_put net/nfc/llcp_core.c:183 [inline]
 nfc_llcp_local_put+0x1ab/0x200 net/nfc/llcp_core.c:178
 llcp_sock_destruct+0x81/0x150 net/nfc/llcp_sock.c:950
 __sk_destruct+0x4b/0x900 net/core/sock.c:1795
 sk_destruct+0xbd/0xe0 net/core/sock.c:1839
 __sk_free+0xef/0x3d0 net/core/sock.c:1850
 sock_wfree+0x129/0x240 net/core/sock.c:2074
 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:712
 skb_release_all net/core/skbuff.c:723 [inline]
 __kfree_skb net/core/skbuff.c:739 [inline]
 kfree_skb net/core/skbuff.c:757 [inline]
 kfree_skb+0xfa/0x3f0 net/core/skbuff.c:751
 skb_queue_purge+0x14/0x30 net/core/skbuff.c:3133
 nfc_llcp_socket_release+0x2e/0x870 net/nfc/llcp_core.c:73
 local_cleanup+0x18/0xb0 net/nfc/llcp_core.c:155
 local_release net/nfc/llcp_core.c:174 [inline]
 kref_put include/linux/kref.h:65 [inline]
 nfc_llcp_local_put net/nfc/llcp_core.c:183 [inline]
 nfc_llcp_local_put+0x18c/0x200 net/nfc/llcp_core.c:178
 llcp_sock_destruct+0x81/0x150 net/nfc/llcp_sock.c:950
 __sk_destruct+0x4b/0x900 net/core/sock.c:1795
 sk_destruct+0xbd/0xe0 net/core/sock.c:1839
 __sk_free+0xef/0x3d0 net/core/sock.c:1850
 sk_free+0x78/0xa0 net/core/sock.c:1861


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

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

                 reply	other threads:[~2021-03-29 15:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000000000000d6689d05beaee1c9@google.com \
    --to=syzbot+0aabbccfb4ec7b744ffd@syzkaller.appspotmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=seanjc@google.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).