diff options
author | Kees Cook <[email protected]> | 2023-01-18 12:35:01 -0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2023-01-20 12:52:29 +0000 |
commit | d3e599c090fc6977331150c5f0a69ab8ce87da21 (patch) | |
tree | 1db25e15bbee6e4096513d4a9b711bf629594905 /tools/perf/scripts/python/syscall-counts.py | |
parent | fdfc76a116b5e9d3e98e6c96fe83b42d011d21d4 (diff) |
bnxt: Do not read past the end of test names
Test names were being concatenated based on a offset beyond the end of
the first name, which tripped the buffer overflow detection logic:
detected buffer overflow in strnlen
[...]
Call Trace:
bnxt_ethtool_init.cold+0x18/0x18
Refactor struct hwrm_selftest_qlist_output to use an actual array,
and adjust the concatenation to use snprintf() rather than a series of
strncat() calls.
Reported-by: Niklas Cassel <[email protected]>
Link: https://lore.kernel.org/lkml/Y8F%2F1w1AZTvLglFX@x1-carbon/
Tested-by: Niklas Cassel <[email protected]>
Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")
Cc: Michael Chan <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Michael Chan <[email protected]>
Reviewed-by: Niklas Cassel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions