diff options
author | Kees Cook <[email protected]> | 2022-06-15 22:23:12 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-06-22 11:04:32 -0700 |
commit | 1e70212e031528918066a631c9fdccda93a1ffaa (patch) | |
tree | 50a9256d404487b053b2a4ea985a72903c740b81 /scripts/gdb/linux/tasks.py | |
parent | 877fe9d49b74e5f84346f9df34e2c7f8086dbceb (diff) |
hinic: Replace memcpy() with direct assignment
Under CONFIG_FORTIFY_SOURCE=y and CONFIG_UBSAN_BOUNDS=y, Clang is bugged
here for calculating the size of the destination buffer (0x10 instead of
0x14). This copy is a fixed size (sizeof(struct fw_section_info_st)), with
the source and dest being struct fw_section_info_st, so the memcpy should
be safe, assuming the index is within bounds, which is UBSAN_BOUNDS's
responsibility to figure out.
Avoid the whole thing and just do a direct assignment. This results in
no change to the executable code.
[This is a duplicate of commit 2c0ab32b73cf ("hinic: Replace memcpy()
with direct assignment") which was applied to net-next.]
Cc: Nick Desaulniers <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Link: https://github.com/ClangBuiltLinux/linux/issues/1592
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions