]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: authencesn - reject too-short AAD (assoclen<8) to match ESP/ESN spec
authorTaeyang Lee <0wn@theori.io>
Fri, 16 Jan 2026 07:03:58 +0000 (16:03 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:34 +0000 (10:27 +0100)
commitb0a9609283a5c852addb513dafa655c61eebc1ef
treefc954c133db60b38a84c99a3872db86fa186cef9
parent93b8635974fb050c43d07e35e5edfe6e685ca28a
crypto: authencesn - reject too-short AAD (assoclen<8) to match ESP/ESN spec

[ Upstream commit 2397e9264676be7794f8f7f1e9763d90bd3c7335 ]

authencesn assumes an ESP/ESN-formatted AAD. When assoclen is shorter than
the minimum expected length, crypto_authenc_esn_decrypt() can advance past
the end of the destination scatterlist and trigger a NULL pointer dereference
in scatterwalk_map_and_copy(), leading to a kernel panic (DoS).

Add a minimum AAD length check to fail fast on invalid inputs.

Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD interface")
Reported-By: Taeyang Lee <0wn@theori.io>
Signed-off-by: Taeyang Lee <0wn@theori.io>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/authencesn.c