[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251105173434.1404676-1-nate.karstens@garmin.com>
Date: Wed, 5 Nov 2025 11:34:34 -0600
From: Nate Karstens <nate.karstens@...min.com>
To: <nate.karstens@...min.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <horms@...nel.org>,
<john.fastabend@...il.com>, <kuba@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux@...blig.org>, <mrpre@....com>,
<nate.karstens@...il.com>, <netdev@...r.kernel.org>,
<pabeni@...hat.com>, <stable@...r.kernel.org>, <tom@...ntonium.net>
Subject: Re: [PATCH] strparser: Fix signed/unsigned mismatch bug
All right, one more time using `git send-email` (plainly I don't do this every day)...
Sabrina,
Thanks for looking at this!
I'm seeing this on kernel version 5.10.244. I know that ktls on the mainline kernel has moved away from strparser, but I think the change would be useful for anyone still using strparser (both for ktls on old kernels and other users as well). It seems that, because head->len was cast to ssize_t, it was an oversight that skb->len wasn't as well (if the intention was to use unsigned arithmetic, then there would be no need to cast head-> len).
Here is an example of the values involved with the test I'm running:
len = 16406
head->len = 1448
skb->len = 1448
stm->strp.offset = 478
(ssize_t)head->len - skb->len - stm.strp.offset = 4294966818
(ssize_t)head->len - (ssize_t)skb->len - stm.strp.offset = -478
I'm happy to update the patch, how much of this information would be useful to include in the commit message?
Nate
________________________________
CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.
Powered by blists - more mailing lists