linux_dsm_epyc7002/net/ipv4
Tom Quetchenbach 8d390efd90 tcp: tcp_probe buffer overflow and incorrect return value
tcp_probe has a bounds-checking bug that causes many programs (less,
python) to crash reading /proc/net/tcp_probe. When it outputs a log
line to the reader, it only checks if that line alone will fit in the
reader's buffer, rather than that line and all the previous lines it
has already written.

tcpprobe_read also returns the wrong value if copy_to_user fails--it
just passes on the return value of copy_to_user (number of bytes not
copied), which makes a failure look like a success.

This patch fixes the buffer overflow and sets the return value to
-EFAULT if copy_to_user fails.

Patch is against latest net-2.6; tested briefly and seems to fix the
crashes in less and python.

Signed-off-by: Tom Quetchenbach <virtualphtn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-24 21:11:58 -07:00
..
ipvs
netfilter netfilter: Fix SCTP nat build. 2008-04-19 17:52:51 -07:00
af_inet.c [IPV4]: Use NIPQUAD_FMT to format ipv4 addresses. 2008-04-14 04:09:00 -07:00
ah4.c
arp.c [IPV4]: Use NIPQUAD_FMT to format ipv4 addresses. 2008-04-14 04:09:00 -07:00
cipso_ipv4.c
datagram.c
devinet.c
esp4.c
fib_frontend.c
fib_hash.c [NET]: Fix heavy stack usage in seq_file output routines. 2008-04-24 01:02:16 -07:00
fib_lookup.h
fib_rules.c
fib_semantics.c [NETNS]: Add netns refcnt debug into fib_info. 2008-04-16 02:00:50 -07:00
fib_trie.c [NET]: Fix heavy stack usage in seq_file output routines. 2008-04-24 01:02:16 -07:00
icmp.c [IPV4]: Convert do_gettimeofday() to getnstimeofday(). 2008-04-21 02:34:08 -07:00
igmp.c
inet_connection_sock.c [SOCK]: Add some notes about per-bind-bucket sock lookup. 2008-04-14 02:42:27 -07:00
inet_diag.c
inet_fragment.c
inet_hashtables.c [INET]: Uninline the __inet_inherit_port call. 2008-04-17 23:18:15 -07:00
inet_lro.c
inet_timewait_sock.c [NETNS]: Add netns refcnt debug for timewait buckets. 2008-04-16 02:00:28 -07:00
inetpeer.c
ip_forward.c
ip_fragment.c [IPV4]: Use NIPQUAD_FMT to format ipv4 addresses. 2008-04-14 04:09:00 -07:00
ip_gre.c [GRE]: Allow for IPPROTO_GRE protocol in namespaces. 2008-04-16 01:11:36 -07:00
ip_input.c [IPV4]: Use NIPQUAD_FMT to format ipv4 addresses. 2008-04-14 04:09:00 -07:00
ip_options.c [IPV4]: Convert do_gettimeofday() to getnstimeofday(). 2008-04-21 02:34:08 -07:00
ip_output.c
ip_sockglue.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
ipcomp.c [IPV4]: Use NIPQUAD_FMT to format ipv4 addresses. 2008-04-14 04:09:00 -07:00
ipconfig.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
ipip.c [IPIP]: Allow to create IPIP tunnels in net namespaces. 2008-04-16 01:06:18 -07:00
ipmr.c
Kconfig Documentation: move nfsroot.txt to filesystems/ 2008-04-11 13:18:01 -06:00
Makefile
netfilter.c [NETFILTER]: Add partial checksum validation helper 2008-04-14 11:15:49 +02:00
proc.c
protocol.c
raw.c
route.c [NET]: Fix heavy stack usage in seq_file output routines. 2008-04-24 01:02:16 -07:00
syncookies.c [Syncookies]: Add support for TCP options via timestamps. 2008-04-10 03:12:40 -07:00
sysctl_net_ipv4.c
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: Make use of before macro in tcp_input.c 2008-04-21 14:46:22 -07:00
tcp_ipv4.c [NET]: Fix heavy stack usage in seq_file output routines. 2008-04-24 01:02:16 -07:00
tcp_lp.c
tcp_minisocks.c
tcp_output.c [TCP]: Remove superflushious skb == write_queue_tail() check 2008-04-15 20:36:55 -07:00
tcp_probe.c tcp: tcp_probe buffer overflow and incorrect return value 2008-04-24 21:11:58 -07:00
tcp_scalable.c
tcp_timer.c [TCP]: Format addresses appropriately in debug messages. 2008-04-14 04:09:36 -07:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c 2008-04-21 02:27:58 -07:00
tunnel4.c [SIT]: Allow for IPPROTO_IPV6 protocol in namespaces. 2008-04-16 01:17:39 -07:00
udp_impl.h
udp.c [NET]: Fix heavy stack usage in seq_file output routines. 2008-04-24 01:02:16 -07:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c