netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Nate Karstens <nate.karstens@garmin.com>
Cc: netdev@vger.kernel.org, Nate Karstens <nate.karstens@gmail.com>,
	Tom Herbert <tom@quantonium.net>,
	stable@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	"Dr. David Alan Gilbert" <linux@treblig.org>,
	Jiayuan Chen <mrpre@163.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] strparser: Fix signed/unsigned mismatch bug
Date: Wed, 5 Nov 2025 00:28:58 +0100	[thread overview]
Message-ID: <aQqMOoy9_pmdcwHS@krikkit> (raw)
In-Reply-To: <20251104174205.984895-1-nate.karstens@garmin.com>

2025-11-04, 11:42:03 -0600, Nate Karstens wrote:
> The `len` member of the sk_buff is an unsigned int. This is cast to
> `ssize_t` (a signed type) for the first sk_buff in the comparison,
> but not the second sk_buff. This change ensures both len values are
> cast to `ssize_t`.
> 
> This appears to cause an issue with ktls when multiple TLS PDUs are
> included in a single TCP segment.

Can you describe a bit more the problematic case (state of the
strparser and all the variables involved maybe?), and how the added
cast fixes it?

And what kernel version are you using to trigger this issue (and then
verify the fix)? ktls hasn't used net/strparser for quite a while (see
commit 84c61fe1a75b ("tls: rx: do not use the standard strparser")).

> Signed-off-by: Nate Karstens <nate.karstens@garmin.com>

A Fixes: tag would also be good, and the subject prefix should be
"[PATCH net]" for bugfixes.

-- 
Sabrina

  reply	other threads:[~2025-11-04 23:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-04 17:42 [PATCH] strparser: Fix signed/unsigned mismatch bug Nate Karstens
2025-11-04 23:28 ` Sabrina Dubroca [this message]
2025-11-05 17:34 ` Nate Karstens
2025-11-05 22:29   ` Jacob Keller
2025-11-05 23:12     ` Nate Karstens
2025-11-05 23:47       ` Jacob Keller
2025-11-06 15:22         ` Sabrina Dubroca
2025-11-06 16:36           ` Nate Karstens
2025-11-06 16:51             ` [PATCH net v2] " Nate Karstens
2025-11-06 22:22               ` Jakub Kicinski

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=aQqMOoy9_pmdcwHS@krikkit \
    --to=sd@queasysnail.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=mrpre@163.com \
    --cc=nate.karstens@garmin.com \
    --cc=nate.karstens@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tom@quantonium.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;
as well as URLs for NNTP newsgroup(s).