[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250912184801.GD224143@horms.kernel.org>
Date: Fri, 12 Sep 2025 19:48:01 +0100
From: Simon Horman <horms@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: Dan Carpenter <dan.carpenter@...aro.org>, netdev@...r.kernel.org,
Marc Dionne <marc.dionne@...istor.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] rxrpc: Fix untrusted unsigned subtract
On Fri, Sep 12, 2025 at 12:06:17AM +0100, David Howells wrote:
> Fix the following Smatch Smatch static checker warning:
nit: Smatch Smatch -> Smatch
>
> net/rxrpc/rxgk_app.c:65 rxgk_yfs_decode_ticket()
> warn: untrusted unsigned subtract. 'ticket_len - 10 * 4'
>
> by prechecking the length of what we're trying to extract in two places in
> the token and decoding for a response packet.
>
> Also use sizeof() on the struct we're extracting rather specifying the size
> numerically to be consistent with the other related statements.
>
> Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lists.infradead.org/pipermail/linux-afs/2025-September/010135.html
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Marc Dionne <marc.dionne@...istor.com>
> cc: Jakub Kicinski <kuba@...nel.org>
> cc: "David S. Miller" <davem@...emloft.net>
> cc: Eric Dumazet <edumazet@...gle.com>
> cc: Paolo Abeni <pabeni@...hat.com>
> cc: Simon Horman <horms@...nel.org>
> cc: linux-afs@...ts.infradead.org
> cc: netdev@...r.kernel.org
> ---
> net/rxrpc/rxgk_app.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists