From: syzbot <syzbot+6ff33f5523299c56d363@syzkaller.appspotmail.com>
To: akarwar@marvell.com, alice.kernel@fastmail.im, bzhao@marvell.com,
davem@davemloft.net, david@ixit.cz, edumazet@kernel.org,
horms@kernel.org, kuba@kernel.org, kylebot@openai.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
oe-linux-nfc@lists.linux.dev, pabeni@redhat.com,
sameo@linux.intel.com, syzkaller-bugs@googlegroups.com,
willemb@google.com
Subject: [syzbot] [nfc?] memory leak in napi_get_frags (2)
Date: Wed, 02 Dec 2026 16:02:49 -0800 [thread overview]
Message-ID: <6b10b1a9.8744ccba.1c9cf9.0098.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: 19cc08c1a6a6 Merge tag 'clk-fixes-for-linus-v7.4' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12abf01d580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4bc392f8c76896d
dashboard link: https://syzkaller.appspot.com/bug?extid=6ff33f5523299c56d363
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14d5c5d9580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/495c3275286d/disk-19cc08c1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/51d62a04dad0/vmlinux-19cc08c1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/120010f6d87b/bzImage-19cc08c1.xz
The issue was bisected by AI to:
commit f26e30cc6b50ba81e30ca3016c29ad4b48b93eaa
Author: Amitkumar Karwar <akarwar@marvell.com>
Date: Mon Jan 6 20:58:19 2014 +0000
NFC: nfcmrvl: Initial commit for Marvell NFC driver
reasoning: https://syzkaller.appspot.com/ai_job?id=4d1821e0-712e-4374-b70d-989f7012fa49
AI-generated root cause summary:
In drivers/nfc/nfcmrvl/usb.c, nfcmrvl_usb_nci_send() relies on the URB
completion callback nfcmrvl_tx_complete() to free the transmitted sk_buff via
kfree_skb(skb), but fails to free skb when URB allocation or submission fails.
When triggered via NFC_CMD_DEV_UP on a USB device whose bulk OUT endpoint has
wMaxPacketSize == 0, usb_submit_urb() rejects the URB with -EMSGSIZE, so
nfcmrvl_tx_complete() never runs and the sk_buff allocated by nci_send_cmd()
(along with its kmalloc_reserve() head buffer) is leaked. The callers
(nfcmrvl_nci_send(), nci_send_frame(), and nci_cmd_work()) hand skb ownership to
ndev->ops->send() and do not free it on error.
full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=6ff33f5523299c56d363
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6ff33f5523299c56d363@syzkaller.appspotmail.com
The bisection result may be wrong.
If you agree with it, please also add:
Fixes: f26e30cc6b50 ("NFC: nfcmrvl: Initial commit for Marvell NFC driver")
BUG: memory leak
unreferenced object 0xffff88810de57c00 (size 240):
comm "syz-executor", pid 5815, jiffies 4294943783
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 20 b9 26 81 88 ff ff 00 00 00 00 00 00 00 00 . .&............
backtrace (crc 9941ea3a):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4733 [inline]
kmem_cache_alloc_bulk_noprof+0x258/0x3d0 mm/slub.c:7671
napi_skb_cache_get net/core/skbuff.c:292 [inline]
__alloc_skb+0x3de/0x4e0 net/core/skbuff.c:694
napi_alloc_skb+0x1ed/0x2f0 net/core/skbuff.c:856
napi_get_frags net/core/gro.c:721 [inline]
napi_get_frags+0x3c/0x80 net/core/gro.c:716
napi_get_frags_check net/core/dev.c:7819 [inline]
netif_napi_add_weight_locked+0x232/0x3c0 net/core/dev.c:7860
netif_napi_add_weight include/linux/netdevice.h:2918 [inline]
netif_napi_add include/linux/netdevice.h:2935 [inline]
wg_peer_create+0x204/0x2b0 drivers/net/wireguard/peer.c:57
set_peer+0x680/0x9f0 drivers/net/wireguard/netlink.c:392
wg_set_device_doit+0x459/0x740 drivers/net/wireguard/netlink.c:569
genl_family_rcv_msg_doit+0x12e/0x1a0 net/netlink/genetlink.c:1114
genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
genl_rcv_msg+0x302/0x440 net/netlink/genetlink.c:1209
netlink_rcv_skb+0x89/0x1c0 net/netlink/af_netlink.c:2585
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
netlink_unicast_kernel net/netlink/af_netlink.c:1336 [inline]
netlink_unicast+0x3e0/0x530 net/netlink/af_netlink.c:1362
netlink_sendmsg+0x36f/0x710 net/netlink/af_netlink.c:1921
sock_sendmsg_nosec net/socket.c:800 [inline]
__sock_sendmsg net/socket.c:818 [inline]
__sys_sendto+0x2d2/0x2e0 net/socket.c:2283
__do_sys_sendto net/socket.c:2290 [inline]
__se_sys_sendto net/socket.c:2286 [inline]
__x64_sys_sendto+0x28/0x30 net/socket.c:2286
BUG: memory leak
unreferenced object 0xffff888106699b80 (size 704):
comm "syz.5.22", pid 5987, jiffies 4294943783
hex dump (first 32 bytes):
20 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 ...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 40ddf9):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4733 [inline]
slab_alloc_node mm/slub.c:5033 [inline]
kmem_cache_alloc_node_noprof+0x368/0x400 mm/slub.c:5105
kmalloc_reserve+0xd2/0x1b0 net/core/skbuff.c:616
__alloc_skb+0x15d/0x4e0 net/core/skbuff.c:716
alloc_skb include/linux/skbuff.h:1391 [inline]
nci_skb_alloc include/net/nfc/nci_core.h:330 [inline]
nci_send_cmd+0x46/0x110 net/nfc/nci/core.c:1397
nci_reset_req net/nfc/nci/core.c:167 [inline]
__nci_request net/nfc/nci/core.c:108 [inline]
nci_open_device net/nfc/nci/core.c:503 [inline]
nci_dev_up+0x1b6/0x690 net/nfc/nci/core.c:643
nfc_dev_up+0xca/0x160 net/nfc/core.c:118
nfc_genl_dev_up+0x3d/0x70 net/nfc/netlink.c:775
genl_family_rcv_msg_doit+0x12e/0x1a0 net/netlink/genetlink.c:1114
genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
genl_rcv_msg+0x302/0x440 net/netlink/genetlink.c:1209
netlink_rcv_skb+0x89/0x1c0 net/netlink/af_netlink.c:2585
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
netlink_unicast_kernel net/netlink/af_netlink.c:1336 [inline]
netlink_unicast+0x3e0/0x530 net/netlink/af_netlink.c:1362
netlink_sendmsg+0x36f/0x710 net/netlink/af_netlink.c:1921
sock_sendmsg_nosec net/socket.c:800 [inline]
__sock_sendmsg net/socket.c:818 [inline]
____sys_sendmsg+0x54a/0x580 net/socket.c:2713
___sys_sendmsg+0x12c/0x160 net/socket.c:2770
__sys_sendmsg+0xcd/0x140 net/socket.c:2802
connection error: failed to recv *flatrpc.ExecutorMessageRawT: EOF
---
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#ai-bisection
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
reply other threads:[~2026-12-03 0:02 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=6b10b1a9.8744ccba.1c9cf9.0098.GAE@google.com \
--to=syzbot+6ff33f5523299c56d363@syzkaller.appspotmail.com \
--cc=akarwar@marvell.com \
--cc=alice.kernel@fastmail.im \
--cc=bzhao@marvell.com \
--cc=davem@davemloft.net \
--cc=david@ixit.cz \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sameo@linux.intel.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=willemb@google.com \
/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