From: Tung Quang Nguyen <tung.quang.nguyen@est.tech>
To: Andrew Stellman <bugs@stellman-greene.com>
Cc: "David S. Miller" <davem@davemloft.net>,
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>,
Jon Maloy <jmaloy@redhat.com>
Subject: RE: [PATCH net] tipc: reject bundles too short for an inner header
Date: Mon, 30 Nov 2026 04:08:21 +0000 [thread overview]
Message-ID: <AM7P189MB1137D6935706703EED5A44D7C64E2@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20261128140830.58925-1-bugs@stellman-greene.com>
>Subject: [PATCH net] tipc: reject bundles too short for an inner header
>
>From: Andrew Stellman <astellman@stellman-greene.com>
>
>tipc_msg_extract() checks *pos against msg_data_sz(hdr) - MIN_H_SIZE.
>msg_data_sz() is unsigned, so for a header-only MSG_BUNDLER, which
There is no such "header-only MSG_BUNDLER" sent by a correctly-configured TIPC node.
>tipc_msg_validate() accepts, the subtraction wraps and the check passes. The
>following msg_size(ihdr) then reads four bytes past the end of the bundle.
>Check that the data can hold an inner header before subtracting.
>
>Tested on mainline (7cd8495c0f16) in arm64 QEMU with KASAN. A test-only
>debugfs hook, not part of this patch, built a header-only bundle in the kernel,
>passed it to tipc_msg_validate() and tipc_msg_extract(), and poisoned 8 bytes
>of tailroom after it as a redzone so KASAN would flag the read. No live TIPC link
>was used, and the bundle didn't come from a peer
This is a wrong usage of TIPC because TIPC does not accept "Man-in-the-middle tampering" messages.
Those kind of messages must be prevented from entering TIPC stack (by using IPsec or TIPC encryption feature).
It is obvious that checking/validating a tampered message cannot return a reliable result.
---
pw-bot: rejected
prev parent reply other threads:[~2026-11-30 4:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 14:08 Andrew Stellman
2026-11-30 4:08 ` Tung Quang Nguyen [this message]
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=AM7P189MB1137D6935706703EED5A44D7C64E2@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM \
--to=tung.quang.nguyen@est.tech \
--cc=bugs@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®