linux/net/ipv6
Tamir Duberstein fb7bc92040 ipv6: raw: check passed optlen before reading
Add a check that the user-provided option is at least as long as the
number of bytes we intend to read. Before this patch we would blindly
read sizeof(int) bytes even in cases where the user passed
optlen<sizeof(int), which would potentially read garbage or fault.

Discovered by new tests in https://github.com/google/gvisor/pull/6957 .

The original get_user call predates history in the git repo.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20211229200947.2862255-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-29 12:32:56 -08:00
..
ila
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-22 11:41:16 +01:00
addrconf.c net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter 2021-11-01 19:57:14 -07:00
addrconf_core.c
addrlabel.c
af_inet6.c net: ipv6: add fib6_nh_release_dsts stub 2021-11-22 15:44:49 +00:00
ah6.c
anycast.c
calipso.c
datagram.c
esp6.c ipv6: check return value of ipv6_skip_exthdr 2021-11-18 11:42:06 +00:00
esp6_offload.c
exthdrs.c ipv6: ioam: Distinguish input and output for hop-limit 2021-10-04 12:53:35 +01:00
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c ipv6: fix memory leak in fib6_rule_suppress 2021-11-29 14:43:35 +00:00
fou6.c
icmp.c
inet6_connection_sock.c
inet6_hashtables.c net: prefer socket bound to interface when not in VRF 2021-10-07 07:27:55 -07:00
ioam6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
ioam6_iptunnel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
ip6_checksum.c
ip6_fib.c
ip6_flowlabel.c
ip6_gre.c ip: use dev_addr_set() in tunnels 2021-10-13 09:41:37 -07:00
ip6_icmp.c
ip6_input.c
ip6_offload.c gro: Fix inconsistent indenting 2021-12-02 12:21:11 +00:00
ip6_offload.h
ip6_output.c ipv6: fix typos in __ip6_finish_output() 2021-11-22 12:42:07 +00:00
ip6_tunnel.c ip: use dev_addr_set() in tunnels 2021-10-13 09:41:37 -07:00
ip6_udp_tunnel.c
ip6_vti.c ip6_vti: initialize __ip6_tnl_parm struct in vti6_siocdevprivate 2021-12-27 12:17:33 +00:00
ip6mr.c
ipcomp6.c
ipv6_sockglue.c ipv6: guard IPV6_MINHOPCOUNT with a static key 2021-10-25 18:02:13 -07:00
Kconfig ipv6: ioam: Add support for the ip6ip6 encapsulation 2021-10-04 12:53:35 +01:00
Makefile net: ipv6: use ipv6-y directly instead of ipv6-objs 2021-09-28 13:13:40 +01:00
mcast.c
mcast_snoop.c
mip6.c
ndisc.c net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter 2021-11-01 19:57:14 -07:00
netfilter.c
output_core.c
ping.c
proc.c
protocol.c
raw.c ipv6: raw: check passed optlen before reading 2021-12-29 12:32:56 -08:00
reassembly.c
route.c net: ipv6: add fib6_nh_release_dsts stub 2021-11-22 15:44:49 +00:00
rpl.c
rpl_iptunnel.c
seg6.c net:ipv6:Remove unneeded semicolon 2021-11-03 11:18:46 +00:00
seg6_hmac.c
seg6_iptunnel.c seg6: fix the iif in the IPv6 socket control block 2021-12-09 07:55:42 -08:00
seg6_local.c
sit.c sit: do not call ipip6_dev_free() from sit_init_net() 2021-12-16 08:38:10 -08:00
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c inet: fully convert sk->sk_rx_dst to RCU rules 2021-12-20 18:46:43 -08:00
tcpv6_offload.c
tunnel6.c
udp.c udp: using datalen to cap ipv6 udp max gso segments 2021-12-23 19:20:06 -08:00
udp_impl.h
udp_offload.c
udplite.c
xfrm6_input.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c