🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24264

[syzbot] [rds?] memory leak in rds_sendmsg

#24264
From: syzbot
Date: Sun, 29 Nov 2026 23:17
126 lines
14291 bytes
Hello,

syzbot found the following issue on:

HEAD commit:    7cd8495c0f16 Merge tag 'io_uring-7.4-20261127' of git://gi..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=130406bd580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8025cb9d600652c3
dashboard link: https://syzkaller.appspot.com/bug?extid=b3f058b8e3b0d80d5bfb
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=162bc1d9580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=170406bd580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/65e3c2f2accb/disk-7cd8495c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bab7aacdf4c7/vmlinux-7cd8495c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/267cdac798e7/bzImage-7cd8495c.xz

The issue was bisected by AI to:

commit 401910db4cd425899832a093539222b6174f92a2
Author: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date:   Tue Feb 27 17:52:43 2018 +0000

    rds: deliver zerocopy completion notification with data

reasoning:      https://syzkaller.appspot.com/ai_job?id=3aeb77a2-ddcd-480e-94a3-97a0c28d61ad

AI-generated root cause summary:
A struct rds_msg_zcopy_info object allocated in rds_message_zcopy_from_user()
can be leaked when an RDS socket is closed before all of its queued zerocopy
rds_message objects have been freed. rds_release() purges rs->rs_zcookie_queue
after rds_send_drop_to(), which removes messages from the socket and connection
queues but does not clear rm->m_rs or wait for transport references such as
cp->cp_xmit_rm to be dropped. When the last reference to the rds_message is
later released, rds_message_purge() unconditionally calls
rds_rm_zerocopy_callback(), inserting the rds_msg_zcopy_info into
rs->rs_zcookie_queue before calling sock_put() to drop the final socket
reference. Because rds_sock_destruct() does not purge rs->rs_zcookie_queue, the
socket is freed while the zcopy notification object remains linked in the
now-freed queue.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=b3f058b8e3b0d80d5bfb

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

The bisection result may be wrong.
If you agree with it, please also add:
Fixes: 401910db4cd4 ("rds: deliver zerocopy completion notification with data")

BUG: memory leak
unreferenced object 0xffff88812a3e1880 (size 64):
  comm "syz.5.22", pid 5979, jiffies 4294947590
  hex dump (first 32 bytes):
    d8 2c fa 09 81 88 ff ff d8 2c fa 09 81 88 ff ff  .,.......,......
    01 00 00 00 42 00 00 00 00 00 00 00 00 00 00 00  ....B...........
  backtrace (crc cc362ab):
    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]
    __kmalloc_cache_noprof+0x35f/0x3f0 mm/slub.c:5676
    _kmalloc_noprof include/linux/slab.h:991 [inline]
    _kzalloc_noprof include/linux/slab.h:1312 [inline]
    rds_message_zcopy_from_user net/rds/message.c:456 [inline]
    rds_message_copy_from_user+0x219/0x4d0 net/rds/message.c:513
    rds_sendmsg+0x1486/0x1d00 net/rds/send.c:1338
    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
    do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
    do_syscall_64+0xe9/0x540 arch/x86/entry/syscall_64.c:89
    entry_SYSCALL_64_after_hwframe+0x77/0x7f

BUG: memory leak
unreferenced object 0xffff8881274f96c0 (size 64):
  comm "syz.2.19", pid 6180, jiffies 4294947912
  hex dump (first 32 bytes):
    d8 1a 5b 03 81 88 ff ff d8 1a 5b 03 81 88 ff ff  ..[.......[.....
    01 00 00 00 42 00 00 00 00 00 00 00 00 00 00 00  ....B...........
  backtrace (crc fce564):
    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]
    __kmalloc_cache_noprof+0x35f/0x3f0 mm/slub.c:5676
    _kmalloc_noprof include/linux/slab.h:991 [inline]
    _kzalloc_noprof include/linux/slab.h:1312 [inline]
    rds_message_zcopy_from_user net/rds/message.c:456 [inline]
    rds_message_copy_from_user+0x219/0x4d0 net/rds/message.c:513
    rds_sendmsg+0x1486/0x1d00 net/rds/send.c:1338
    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
    do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
    do_syscall_64+0xe9/0x540 arch/x86/entry/syscall_64.c:89
    entry_SYSCALL_64_after_hwframe+0x77/0x7f

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: <6b0cb29a.c4dd33ab.25911d.002b.GAE@google.com>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373708-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373708-linux-kernel-netdev=dewy.ru
From: syzbot+b3f058b8e3b0d80d5bfb@syzkaller.appspotmail.com (syzbot)
Newsgroups: linux.kernel.netdev
Subject: [syzbot] [rds?] memory leak in rds_sendmsg
Date: Sun, 29 Nov 2026 15:17:46 -0800
Organization: Usenet Network
Message-ID: <6b0cb29a.c4dd33ab.25911d.002b.GAE@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
	logging-data="1283142"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:20ozrY8aBU+VM9QhiXC5VxZ+GdA= sha256:CfFO7N0QoycSwNUqkS+52EYlf0CllOaJHMBwr8mbiog=
	sha1:m5qG5zQNc8WLKNH9xREVFiiML7w= sha256:GxvQjTX1S9KYJlnk8VFxGY0oFYvvHBjDHP0gM7bGfMc=
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 91C7C125FB2; Mon, 30 Nov 2026 02:18:00 +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 VcamuVLIzwag;
	Mon, 30 Nov 2026 02:17:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-373708-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 10DE4125F08; Mon, 30 Nov 2026 02:17:51 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id A5BC921484; Sun, 29 Nov 2026 23:17:49 +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=1795994267;
	b=1EXuw26Z356zm2sll/p/pyP9tM1O/VDU0DK+a3ytiR/mcZf417JFgJzazqIDsn9oFDD4
	 7bjiHWhnxFeTe5CT0iUngWUBpjdk0HUmEptaCFDlVXSBhtuhgXD63BFU80MLVXRZ3cnFM
	 Nl2wfF/gRPT+h6PeeIogRGyz0CXPzK+KgFiRdZ1W4qrQYw4Ki0vkGr5JJysAKWIl11B8O
	 p9QhVXfr5XKS4g3sCxNQ+5C8YVtrzZVviMXXLl7pQeG/w5nZDz2GGaGI/Kw0BMu3EpukW
	 TPp0AxDxMpjIgPjHe4Wp8ringOJXI9qpGlJYfH3BNlfiNq0lAw+DA1x8Q7daT8ShHmw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795994267;
	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=o/IT1ZT32Pa1PUjSRWcOvyLhsAYwTxyLN15fH5gMLQk=;
	b=ao81TNMiXnSNwLfwu9HPB+ZnlYArvfrNhBaCY6P0GgmZRhPy7rtwFkuVCoszu2UhX9Sm
	 1GF5yDT1USvmgu/SXXo9TQX0qvXDvj9qEYJgvDQpI4XxY12IGSib8R6Gmp3D3oWY9t4AT
	 Z7rTXmhRYsSnGRn9/QSTr3TWCEcTyRkoVt7M2pAZJMS0sgVsN8dDD3PBsFpc1zez28nej
	 Ov3Za06Y8Pa6fbL7QhRUj7gMcnJxuvaY13V2bHbJgYPv10RoVI/Gtyjbf90xfEUFEygfy
	 GGlpKd7Km8SxVAcg5iAYf381wDbmQ3jRfkFnAcsgb5C/hsf2DhuPt4T1SdyIwwz3/jg==
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 DF77A606A327;
	Sun, 29 Nov 2026 23:17:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.200
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795994267;
	b=pJjUwv4yjvjOoqf0ET/hcagfZ3C7QeDfpdIeqYFIqVCl33uKRA2SdFvk4D+FKPVKit0X
	 zHhuBFdc/WBsKaJZrZqI9LwnelzeRXsX0+otlxgaAnsvq1/LCNnqHeP5iSaXuJkJlcoKV
	 OU9cvEpr0vQQ/3Dr6KzkT7Pj4ZSJ8bBcdQug/U3EVKByHHgaM1Ni17vGZgw7iagN7jMhW
	 If8n2DcHe8DvE1Q401BAZ7JIHEDyKXCyuuc5gQ2B5HOHGk/+UtKLuZp0Z3lNM30Qih/tD
	 GKldDYkPX70I8sUSC3c36nzoOATXZJaCIgZgoI2go/ds8nm6ARhRKFEMCnCboCFYUlg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795994267;
	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=o/IT1ZT32Pa1PUjSRWcOvyLhsAYwTxyLN15fH5gMLQk=;
	b=hI1lGEG/H63CWxELtn5w7GgfoFxFRpZkuhebUJcS5OXOBouKkPgL7VfSPgPzSwPTl3u7
	 0TbTS9hCCzgW7yly1Hs24VSrzqPk2IuRiFSfvvfHMPZ7Ckgw5EThaAAGmRLmMhIglcCik
	 K16CbSyFy2Dg4dKT7XQSAL62pZP1hvHH3m3zHzrQXKozn4OIvAg/+5pRvTWeCWnTj1LaL
	 uUealxJR/ViMUrY4r+7ylqceJ5rnrp8r0vONsQTG/1x3G3pP55mvELuLtXyHTkbEm4cLG
	 rpVHMuK66c2zZqkPguC4V3PDbVxis5349wS91c4bTxnb8Pfbex9JWAauNOBtPDVtSYw==
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=209.85.167.200
X-Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200])
	(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 E7DF5606A31C
	for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 23:17:46 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7DF5606A31C
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-oi1-f200.google.com with SMTP id 5614622812f47-5384e381fbbso8529686b6e.2
        for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 15:17:46 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795994266; x=1796599066;
        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=o/IT1ZT32Pa1PUjSRWcOvyLhsAYwTxyLN15fH5gMLQk=;
        b=YALWY+YX6b71ox6CiqSxUE+dEbGG5R1uAOrqOCqcI11jqGCNYr5+vp7ldAIIKs1kub
         VattUwqsmPxSfdq9yOM0hXfk1Gi87Yt8UIlfagJbMWgyBUvVEwUgXERPAUrMW6BnT63j
         wqI7UYmwT0evCabyUgKNskMLa4PgWgzjVtr0aijdb79I70maVLRVjFQyT/Fv9xGP43NI
         jigHaVLF09ilGGueRit16dKGL9HhB1M4baOYhGZ+s4AliigXk06SDzNjz3m+M+UcNWgv
         Y7cXreEjE35NrdDCCxlfcMDQJD1r7cftaJWEu5445hG4Gvf+S8/7BViHKCzmWMMOjdcg
         v08w==
X-Forwarded-Encrypted: i=1; AL+hErFyTog5vyBMzoLYcyiKFmGFYE9umZXTGp3XFOzdLWDx5Blux3S+srpQg98+P4jtAioMze96Qj4=@vger.kernel.org
X-Gm-Message-State: APuU4Z9bMrbGs87AygAdE5rfmRmFTyJzkHxDoeB6lvonUVYFpLtEAl0m
	dRMRPsXPumYg6Kq2Tf6ip67ZB3XTeBvFNGNPeI4mFopm+QfN3Gjj5a+6j+5xuOL2YptPZZjvSPJ
	M7vwC0xeuVYvTyGdQxS/WhIHPQkW7THvHJefZL6BxFLcPFYJANfohVV/uTvs=
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:6808:50ab:b0:4fa:8d48:3a6a with SMTP id
 5614622812f47-57a0a21202dmr33271579b6e.18.1795994266049; Sun, 29 Nov 2026
 15:17:46 -0800 (PST)
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller