summaryrefslogtreecommitdiff
path: root/fs/devfs/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2026-03-17 12:25:14 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2026-03-26 18:10:58 +0900
commit80688afb9c35b3934ce2d6be9973758915e2e0ef (patch)
tree64d172d2aba705ccaf3d5a4c2df3c7abe3d0a673 /fs/devfs/git@git.tavy.me:linux.git
parent5ddfdcbe10dc5f97afc4e46ca22be2be717e8caf (diff)
crypto: caam - fix overflow on long hmac keys
When a key longer than block size is supplied, it is copied and then hashed into the real key. The memory allocated for the copy needs to be rounded to DMA cache alignment, as otherwise the hashed key may corrupt neighbouring memory. The copying is performed using kmemdup, however this leads to an overflow: reading more bytes (aligned_len - keylen) from the keylen source buffer. Fix this by replacing kmemdup with kmalloc, followed by memcpy. Fixes: 199354d7fb6e ("crypto: caam - Remove GFP_DMA and add DMA alignment padding") Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'fs/devfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions