From: Tung Quang Nguyen <tung.quang.nguyen@est.tech>
To: Andrew Stellman <astellman@stellman-greene.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jon Maloy <jmaloy@redhat.com>, Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"tipc-discussion@lists.sourceforge.net"
<tipc-discussion@lists.sourceforge.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net] tipc: zero the pad bytes between bundled messages
Date: Mon, 23 Nov 2026 02:37:59 +0000 [thread overview]
Message-ID: <AM7P189MB11376459A3A6F49643AC25AEC6452@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20261119184127.24931-1-astellman@stellman-greene.com>
>Subject: [PATCH net] tipc: zero the pad bytes between bundled messages
>
>tipc_msg_bundle() places each message in a bundle at a 4-byte aligned offset.
>It extends the bundle with skb_put() to cover both the padding and the
>message, but copies only the message, so the 0 to 3 pad bytes before it keep
>whatever was in the skb's tailroom, and they are sent to the peer node.
>
>Zero the pad bytes. Commit 81c600c26302 ("tipc: Dont send random pad bytes
>in RESET/ACTIVATE messages") fixed the same kind of leak in link protocol
>messages.
>
>Reproduced on v7.4-rc3 with two QEMU guests as TIPC nodes, booted with
>slub_debug=P, which fills free slab objects with 0x6b. One guest sends
>60,000 SOCK_RDM messages with 41, 45 and 37 bytes of data to the other.
>That fills the link window, so some are bundled, and a packet socket on the
>sender captures the outgoing frames. Without this patch every captured pad
>byte was 0x6b; with it they are all zero and every message is still delivered. No
>other kernel changes, debug code or error injection were needed, and there is
>no TIPC selftest to run.
>
>The issue was found by Claude Opus 5.5 running Quality Playbook, an LLM-
>driven code review tool:
>https://github.com/andrewstellman/quality-playbook
>The fix and this changelog were drafted with the same tool and reviewed by
>me.
>
>Fixes: b97bf3fd8f6a ("[TIPC] Initial merge")
>Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
>---
>A reproducer is available on request.
>
> net/tipc/msg.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 39dfd33c8eec..b0d52609b03d
>100644
>--- a/net/tipc/msg.c
>+++ b/net/tipc/msg.c
>@@ -509,7 +509,8 @@ static bool tipc_msg_bundle(struct sk_buff *bskb,
>struct tipc_msg *msg,
> if (unlikely(max < (offset + msz)))
> return false;
>
>- skb_put(bskb, pad + msz);
>+ skb_put_zero(bskb, pad);
>+ skb_put(bskb, msz);
> skb_copy_to_linear_data_offset(bskb, offset, msg, msz);
> msg_set_size(bmsg, offset + msz);
> msg_set_msgcnt(bmsg, msg_msgcnt(bmsg) + 1);
>
Reviewed-by: Tung Nguyen <tung.quang.nguyen@est.tech>
next prev parent reply other threads:[~2026-11-23 2:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 18:41 Andrew Stellman
2026-11-23 2:37 ` Tung Quang Nguyen [this message]
2026-11-25 15:40 ` patchwork-bot+netdevbpf
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=AM7P189MB11376459A3A6F49643AC25AEC6452@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM \
--to=tung.quang.nguyen@est.tech \
--cc=astellman@stellman-greene.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jmaloy@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tipc-discussion@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®