diff options
| author | Kees Cook <[email protected]> | 2022-09-02 21:37:49 -0700 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-09-05 14:45:22 +0100 |
| commit | 710d21fdff9a98d621cd4e64167f3ef8af4e2fd1 (patch) | |
| tree | c039cd1cbfc4dc5dc57138e1d5752e155810be5a /tools/perf/scripts/python | |
| parent | 05ad5d4581c3c1cc724fe50d4652833fb9f3037b (diff) | |
netlink: Bounds-check struct nlmsgerr creation
In preparation for FORTIFY_SOURCE doing bounds-check on memcpy(),
switch from __nlmsg_put to nlmsg_put(), and explain the bounds check
for dealing with the memcpy() across a composite flexible array struct.
Avoids this future run-time warning:
memcpy: detected field-spanning write (size 32) of single field "&errmsg->msg" at net/netlink/af_netlink.c:2447 (size 16)
Cc: Jakub Kicinski <[email protected]>
Cc: Pablo Neira Ayuso <[email protected]>
Cc: Jozsef Kadlecsik <[email protected]>
Cc: Florian Westphal <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: syzbot <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions