diff options
author | Eric Dumazet <[email protected]> | 2023-04-12 13:03:08 +0000 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2023-04-13 10:04:37 -0700 |
commit | 1c5950fc6fe996235f1d18539b9c6b64b597f50f (patch) | |
tree | 70d65ea09555a8eaa1a255c7655cc197e7634807 /scripts/gdb | |
parent | 306dc21361993f4fe50a15d4db6b1a4de5d0adb0 (diff) |
udp6: fix potential access to stale information
lena wang reported an issue caused by udpv6_sendmsg()
mangling msg->msg_name and msg->msg_namelen, which
are later read from ____sys_sendmsg() :
/*
* If this is sendmmsg() and sending to current destination address was
* successful, remember it.
*/
if (used_address && err >= 0) {
used_address->name_len = msg_sys->msg_namelen;
if (msg_sys->msg_name)
memcpy(&used_address->name, msg_sys->msg_name,
used_address->name_len);
}
udpv6_sendmsg() wants to pretend the remote address family
is AF_INET in order to call udp_sendmsg().
A fix would be to modify the address in-place, instead
of using a local variable, but this could have other side effects.
Instead, restore initial values before we return from udpv6_sendmsg().
Fixes: c71d8ebe7a44 ("net: Fix security_socket_sendmsg() bypass problem.")
Reported-by: lena wang <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Maciej Żenczykowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions