Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Andrew Stellman
Thu, 19 Nov 2026 18:41
[PATCH net] tipc: zero the pad bytes between bundled messages
Author: Andrew Stellman
Date: Thu, 19 Nov 2026 18:41
Date: Thu, 19 Nov 2026 18:41
52 lines
12946 bytes
12946 bytes
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);
base-commit: 1e575bda30acc0bf01f799cee798d4a1c100d538
--
2.43.0
RE: [PATCH net] tipc: zero the pad bytes between bundled messages
Author: Tung Quang Nguyen
Date: Mon, 23 Nov 2026 02:37
Date: Mon, 23 Nov 2026 02:37
59 lines
19367 bytes
19367 bytes
>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>
Re: [PATCH net] tipc: zero the pad bytes between bundled messages
Author: patchwork-bot+netdevbpf
Date: Wed, 25 Nov 2026 15:40
Date: Wed, 25 Nov 2026 15:40
27 lines
8788 bytes
8788 bytes
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 19 Nov 2026 13:41:27 -0500 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net] tipc: zero the pad bytes between bundled messages
https://git.kernel.org/netdev/net-next/c/504e306886ed
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads