Article View: linux.kernel.netdev
Article #26047[syzbot] [nfc?] memory leak in napi_get_frags (2)
From: syzbot
Date: Thu, 03 Dec 2026 00:02
Date: Thu, 03 Dec 2026 00:02
145 lines
15474 bytes
15474 bytes
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
Technical Details
Message-ID:
<6b10b1a9.8744ccba.1c9cf9.0098.GAE@google.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376147-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376147-linux-kernel-netdev=dewy.ru
From: syzbot+6ff33f5523299c56d363@syzkaller.appspotmail.com (syzbot)
Newsgroups: linux.kernel.netdev
Subject: [syzbot] [nfc?] memory leak in napi_get_frags (2)
Date: Wed, 02 Dec 2026 16:02:49 -0800
Organization: Usenet Network
Message-ID: <6b10b1a9.8744ccba.1c9cf9.0098.GAE@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
logging-data="2093146"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:QI4bsrX4CstY6c04Mejbv+2ByL4= sha256:M0pdN/gUnwlcuRTVlIHEDd+DKJ2s/P3e9c0nspeR0+k=
sha1:IdWIISqMWrWOAP4keMGFqXsPKdI= sha256:E95Irk6nFNa9b7Qm+SWYDetIlsnL1rgxGuroof1Gj0Y=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id CD88A1177AD; Thu, 3 Dec 2026 03:03:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.146
X-Spam-Status: No, score=-0.146 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, FROM_LOCAL_HEX=0.331,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SORTED_RECIPS=2.474, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id qR6tgjrnbcgC;
Thu, 3 Dec 2026 03:03:34 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376147-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=syzkaller.appspotmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id C64BA1177AA; Thu, 3 Dec 2026 03:03:30 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 5EDFA2B91E; Thu, 3 Dec 2026 00:02:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796256176;
b=gkj1/CatYn1JQ2m59qdyyzfoDKuuIjup/0VZaa46LTMCH+ij46+/7cfpVIuJx7Fsq98h
KhUzadhYxe67eK/NmEioYMVSCAPRa2OoAWvbtuQmeA6ma6OtkEeTCIIyxGg5zGk6ZUXNY
PRBfmDM+qcf1dVh3QSnoZWkvXGyEVk0CKuMGX89RVHr23UTc+aB7AjTCB1vpayVRv+43c
gqhC0y+WDamhljWnq9Xtc/Bn8wRA3izODalTa0SfTlpeAR4q5doLme1/nYBeA4Lae9m/n
Fm9YEbFTcByAeICzonvCHiaYAsC96H69Ta2en89Xi88W5+rgMvzY+F5DajBdtjYtNGQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796256176;
h=X-Original-To:Received:DMARC-Filter:Received:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:X-Received:Date:X-Google-Appengine-App-Id:
X-Google-Appengine-App-Id-Alias:Message-ID:Subject:From:To:
Content-Type;
bh=uhb4YWIx2qHFqtaqxyD2oS3eewLeiIGemRAgY7QWwok=;
b=oX7CoqU/FGWSno6PbWqeVMDPq2xD1Kvj4Nhi0XQ+sBtc9VuX/Lr6rBB7py22gVez/YH8
pcN4k9AzOPBPEKsfaikunH+qWMfcZYUOUQuzUJajmVWLM6+aF0bWS7JnDqlGwqfmFLU6t
PbA32bcZZakXR48fUqalJYPTQNmsU9SERmV1BjQA3i9KS9Qi1/MMIInBtvcRdrIcx+VxE
Do6u/jmngRdUXnu3zVq/vqMFYNT+hay1uRbg8C2sMes959D75AA+Jwn5N/sNbhfCu9IBL
fpzkL7DDa9kJlp/8ORDEX17JESAyjmLk0qv4GOCa7FzHlvCG0hcVai/3f4esfZM3Z2w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=fail header.from=syzkaller.appspotmail.com;
spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 41151606A32D;
Thu, 3 Dec 2026 00:02:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.128
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796256170;
b=SNHqxMZWbHPnX6DR1cJ9+bdr24Hp8lQNZDm4fzEqmI65972TpDN74NiBcP7hz1hxVRzd
FvmbPs9cQ6XW9XJNAFmbsShqvJQCzE9L4s4XLHgGtW9jFGzeR164a41KrB/ozc/uW/b13
se2/xfejgd4GNzCXglL0GKkelGUZjN+Q/maaodKF8Wqdqugns0FelEI7AkpXl7ZoARz2s
edrlFFRBA+l0/0h3pEvtTf6gD3VMUYt318qHTON/zw/pCxxw8+ePUeVsxDxVVViN1ft4i
7aDA/KN1QAKXvz54UAgoOHcJqTD+6h+IyD/U+FeuMtO7UkSEVsQxom3tWjnvCT3928Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796256170;
h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted:
X-Gm-Message-State:MIME-Version:X-Received:Date:
X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID:
Subject:From:To:Content-Type;
bh=uhb4YWIx2qHFqtaqxyD2oS3eewLeiIGemRAgY7QWwok=;
b=CJk85W9/E4r3cS7nnECUAEqp+9kPblSOb8oXMNAByBl6PEDRBVCe5GgcysNO78dufM52
/nRrtQClSr4qrR0E4IUSM4Xw7Avqah1Qb8MGYNe/5hdX0RVLjkYY2RBaN34tZBOutXwYi
87Y9F6LxFvt2mOH4pNgcQTIWuHj/3j13aTc4EeDHm6/KyAaGBU8u2Yb4DJJXKXFWVwkAA
vKX1ilZUx1uRBRJMZfBCIdUMjOfv605yZtkhGW7J2VOuG01ZrmS0Ia/kgwO2YdKQOYQ0C
dR6wpP7ERYp+KI2C95gfYtu1lknJ6dFQKJ+9C93Z/wtPCaSmP8pfGtIlL0bKrSuTFAw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=fail header.from=syzkaller.appspotmail.com;
spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com;
arc=none smtp.remote-ip=74.125.231.128
X-Received: from mail-oo2-f0.google.com (mail-oo2-f0.google.com [74.125.231.128])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20A4D606A330
for <netdev@vger.kernel.org>; Thu, 3 Dec 2026 00:02:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 20A4D606A330
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
X-Received: by mail-oo2-f0.google.com with SMTP id 006d021491bc7-71b1c6cb11fso2385552eaf.0
for <netdev@vger.kernel.org>; Wed, 02 Dec 2026 16:02:49 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796256169; x=1796860969;
h=content-type:to:from:subject:message-id:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=uhb4YWIx2qHFqtaqxyD2oS3eewLeiIGemRAgY7QWwok=;
b=gyW6OdZrmw+BcgbBbLU/7AG3X2oXvX2f5+d3Vz0J5QhrOSKVKnU1syQ90Ahn04kKbW
HV+XZ3RDSrPUJYbYq5PJxuT8FfgJ+70no5Yh+UeXpeKoEafbGEUp2QvuSWNKHVltXseL
mosbcwbOFK+3lRy0rTiC/pgzbxFIVTJliwAZW4kH0K5f5HR9s/660O9BZmDUiow8GPB8
EjGsF2uBZ5ro4OZJAts0IRfLzW23XuWzap3OGrDxiUlb3YWqPNNqygZKixDH6SfBi3tQ
SGtSbjUcibom0UmWlF8HYfTB7HwCP0WF8cFx6mpO/clhV0lox5FaGG1tVDdbLdbHhIWt
RwKQ==
X-Forwarded-Encrypted: i=1; AL+hErGaHeW3/5XuxLoCLbBzmPeN0v8lLS2wFrBYZyUejPkLT84M5doTFmdqGA0jQ2r3EHbL0wiNSUs=@vger.kernel.org
X-Gm-Message-State: APuU4Z9yY858hsLluDNXY/k5LSIu2rHqUSom6eMXLpriWTUHbtBbWHkn
WOINdMcNuPtwm5Zxg/Cv9P3kKFq2Ibopc2GfN8EK/Cc6c5X84/L6rUpdwo+6g3qFFHZK+X47plg
bKONgFLVlEoAuVHgG5XLH+72uKQJI7DLutMiYifDW6JOiAveAYaQqydKpdCg=
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Received: by 2002:a05:6820:570b:20b0:71a:d8a5:4d1b with SMTP id
006d021491bc7-71b3947aef8mr25832133eaf.36.1796256169024; Wed, 02 Dec 2026
16:02:49 -0800 (PST)
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller