aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86/nested_exceptions_test.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2025-03-07 09:28:48 +0000
committerJakub Kicinski <[email protected]>2025-03-10 20:17:33 +0000
commit991a1b09920bc15c66f64c1e7d15cdabd3816c46 (patch)
treeb579ada2a2800899fd02787d1082e60f63a67eb1 /tools/testing/selftests/kvm/x86/nested_exceptions_test.c
parentr8169: increase max jumbo packet size on RTL8125/RTL8126 (diff)
downloadkernel-991a1b09920bc15c66f64c1e7d15cdabd3816c46.tar.gz
kernel-991a1b09920bc15c66f64c1e7d15cdabd3816c46.zip
eth: fbnic: fix memory corruption in fbnic_tlv_attr_get_string()
This code is trying to ensure that the last byte of the buffer is a NUL terminator. However, the problem is that attr->value[] is an array of __le32, not char, so it zeroes out 4 bytes way beyond the end of the buffer. Cast the buffer to char to address this. Fixes: e5cf5107c9e4 ("eth: fbnic: Update fbnic_tlv_attr_get_string() to work like nla_strscpy()") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Lee Trager <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/x86/nested_exceptions_test.c')
0 files changed, 0 insertions, 0 deletions