linux-stable/net
Hangbin Liu 9bb59a21f5 tcp: warn if offset reach the maxlen limit when using snprintf
snprintf returns the number of chars that would be written, not number
of chars that were actually written. As such, 'offs' may get larger than
'tbl.maxlen', causing the 'tbl.maxlen - offs' being < 0, and since the
parameter is size_t, it would overflow.

Since using scnprintf may hide the limit error, while the buffer is still
enough now, let's just add a WARN_ON_ONCE in case it reach the limit
in future.

v2: Use WARN_ON_ONCE as Jiri and Eric suggested.

Suggested-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-20 22:23:36 -08:00
..
6lowpan
9p 9p pull request for inclusion in 5.4 2019-09-27 15:10:34 -07:00
802
8021q net: remove unnecessary variables and callback 2019-10-24 14:53:49 -07:00
appletalk appletalk: enforce CAP_NET_RAW for raw sockets 2019-09-24 16:37:18 +02:00
atm net: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08:00
ax25 net: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08:00
batman-adv batman-adv: Drop lockdep.h include for soft-interface.c 2019-11-03 08:30:58 +01:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2019-11-12 19:29:57 -08:00
bpf bpf: Fix memory leak on object 'data' 2019-11-18 19:32:59 -08:00
bpfilter
bridge bridge: implement get_link_ksettings ethtool method 2019-11-12 19:52:15 -08:00
caif Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-02 13:54:56 -07:00
can can: j1939: warn if resources are still linked on destroy 2019-11-13 10:42:34 +01:00
ceph libceph: use ceph_kvmalloc() for osdmap arrays 2019-09-16 12:06:25 +02:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-11-20 18:11:23 -08:00
dcb
dccp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-09 11:04:37 -08:00
decnet net: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08:00
dns_resolver
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
ethernet net: add annotations on hh->hh_len lockless accesses 2019-11-07 20:07:30 -08:00
hsr
ieee802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-02 13:54:56 -07:00
ife net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
ipv4 tcp: warn if offset reach the maxlen limit when using snprintf 2019-11-20 22:23:36 -08:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2019-11-18 16:43:05 -08:00
iucv
kcm kcm: disable preemption in kcm_parse_func_strparser() 2019-09-27 10:27:14 +02:00
key
l2tp net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
l3mdev
lapb
llc net: silence data-races on sk_backlog.tail 2019-11-06 21:35:34 -08:00
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-09 11:04:37 -08:00
mac802154
mpls
ncsi net/ncsi: Disable global multicast filter 2019-09-19 18:04:40 -07:00
netfilter netfilter: nft_payload: add C-VLAN offload support 2019-11-20 11:21:34 -08:00
netlabel netlabel: remove redundant assignment to pointer iter 2019-09-01 11:45:02 -07:00
netlink genetlink: do not parse attributes for families with zero maxattr 2019-10-13 11:20:03 -07:00
netrom net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-09 11:04:37 -08:00
nsh
openvswitch net: openvswitch: don't call pad_packet if not necessary 2019-11-15 12:43:27 -08:00
packet packet: fix data-race in fanout_flow_is_huge() 2019-11-08 14:06:19 -08:00
phonet net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
psample net: sched: take reference to psample group in flow_action infra 2019-09-16 09:18:03 +02:00
qrtr net: qrtr: Simplify 'qrtr_tun_release()' 2019-10-30 17:58:23 -07:00
rds Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
rfkill
rose net: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08:00
rxrpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-02 13:54:56 -07:00
sched net: sched: pie: enable timestamp based delay calculation 2019-11-20 12:31:45 -08:00
sctp sctp: add SCTP_PEER_ADDR_THLDS_V2 sockopt 2019-11-08 14:18:32 -08:00
smc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
strparser
sunrpc SUNRPC: Destroy the back channel when we destroy the host transport 2019-10-30 12:04:35 -04:00
switchdev
tipc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
tls net/tls: Fix unused function warning 2019-11-15 12:12:28 -08:00
unix Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-02 13:54:56 -07:00
vmw_vsock vsock: fix bind() behaviour taking care of CID 2019-11-14 18:12:18 -08:00
wimax
wireless Some relatively small changes: 2019-11-08 11:36:48 -08:00
x25 net: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08:00
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-11-02 15:29:58 -07:00
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c