diff options
| author | Dan Carpenter <[email protected]> | 2024-12-04 12:07:15 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2025-01-10 16:49:05 +0000 |
| commit | 55cf2f4b945f6a6416cc2524ba740b83cc9af25a (patch) | |
| tree | c2765ada6cad62a82939aa663996df6a83ae507a /arch/powerpc/lib/code-patching.c | |
| parent | selftests/exec: add a test for execveat()'s comm (diff) | |
| download | kernel-55cf2f4b945f6a6416cc2524ba740b83cc9af25a.tar.gz kernel-55cf2f4b945f6a6416cc2524ba740b83cc9af25a.zip | |
binfmt_flat: Fix integer overflow bug on 32 bit systems
Most of these sizes and counts are capped at 256MB so the math doesn't
result in an integer overflow. The "relocs" count needs to be checked
as well. Otherwise on 32bit systems the calculation of "full_data"
could be wrong.
full_data = data_len + relocs * sizeof(unsigned long);
Fixes: c995ee28d29d ("binfmt_flat: prevent kernel dammage from corrupted executable headers")
Cc: [email protected]
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions
