diff options
| author | Friedrich Vock <friedrich.vock@gmx.de> | 2024-05-14 09:09:31 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 11:03:55 +0200 |
| commit | 105624d7f63ff709c8ff59e14c47fbf1bc699b10 (patch) | |
| tree | b325aaaf7ac6dd89de26c16d2791c3aa6711dfa7 /sound | |
| parent | 242b30466879e6defa521573c27e12018276c33a (diff) | |
| download | linux-105624d7f63ff709c8ff59e14c47fbf1bc699b10.tar.gz linux-105624d7f63ff709c8ff59e14c47fbf1bc699b10.tar.bz2 linux-105624d7f63ff709c8ff59e14c47fbf1bc699b10.zip | |
bpf: Fix potential integer overflow in resolve_btfids
[ Upstream commit 44382b3ed6b2787710c8ade06c0e97f5970a47c8 ]
err is a 32-bit integer, but elf_update returns an off_t, which is 64-bit
at least on 64-bit platforms. If symbols_patch is called on a binary between
2-4GB in size, the result will be negative when cast to a 32-bit integer,
which the code assumes means an error occurred. This can wrongly trigger
build failures when building very large kernel images.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object")
Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240514070931.199694-1-friedrich.vock@gmx.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions
