Thread (6 messages) 6 messages, 2 authors, 2024-12-18

Re: [PATCH net] xfrm: Rewrite key length conversion to avoid overflows

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2024-12-18 11:59:19
Also in: kernel-janitors, linux-hardening, lkml

On Wed, Dec 18, 2024 at 01:54:38PM +0300, Dan Carpenter wrote:
The length is capped in verify_one_alg() type functions:

	if (nla_len(rt) < (int)xfrm_alg_len(algp)) {

nla_len() is a USHRT_MAX so the rounded value can't be higher than that.
Good catch.  I hope a similar limit applies for af_key?

Thanks,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help