diff options
| author | Richard Weinberger <[email protected]> | 2024-08-02 18:36:44 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-08-15 16:14:36 -0600 |
| commit | 233945eba63e24061dffeeaeb7cd6fe985278356 (patch) | |
| tree | 2e35b6347ffc0135cd9b75c181bd6f482eee641c /include/linux/linux_string.h | |
| parent | 9b9368b5c4dc24b3b999743db26fb915981d26a9 (diff) | |
squashfs: Fix integer overflow in sqfs_resolve_symlink()
A carefully crafted squashfs filesystem can exhibit an inode size of 0xffffffff,
as a consequence malloc() will do a zero allocation.
Later in the function the inode size is again used for copying data.
So an attacker can overwrite memory.
Avoid the overflow by using the __builtin_add_overflow() helper.
Signed-off-by: Richard Weinberger <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Diffstat (limited to 'include/linux/linux_string.h')
0 files changed, 0 insertions, 0 deletions
