TencentOS-kernel/net
Oleksij Rempel a314b3364e can: j1939: transport: j1939_xtp_rx_dat_one(): compare own packets to detect corruptions
[ Upstream commit e052d0540298bfe0f6cbbecdc7e2ea9b859575b2 ]

Since the stack relays on receiving own packets, it was overwriting own
transmit buffer from received packets.

At least theoretically, the received echo buffer can be corrupt or
changed and the session partner can request to resend previous data. In
this case we will re-send bad data.

With this patch we will stop to overwrite own TX buffer and use it for
sanity checking.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20200807105200.26441-6-o.rempel@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:35:05 +08:00
..
6lowpan Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
9p net/9p: validate fds in p9_fd_open 2021-03-16 16:33:05 +08:00
802 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
8021q Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
appletalk appletalk: Fix atalk_proc_init() return path 2021-03-16 16:33:09 +08:00
atm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ax25 AX.25: Prevent integer overflows in connect and sendmsg 2021-03-16 16:32:42 +08:00
batman-adv batman-adv: Revert "disable ethtool link speed detection when auto negotiation off" 2021-03-16 16:29:21 +08:00
bluetooth Bluetooth: add a mutex lock to avoid UAF in do_enale_set 2021-03-16 16:33:19 +08:00
bpf Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
bpfilter net/bpfilter: remove superfluous testing message 2021-03-16 16:26:23 +08:00
bridge netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency 2021-03-16 16:35:05 +08:00
caif Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
can can: j1939: transport: j1939_xtp_rx_dat_one(): compare own packets to detect corruptions 2021-03-16 16:35:05 +08:00
ceph libceph: don't omit recovery_deletes in target_copy() 2021-03-16 16:32:16 +08:00
core net: Fix potential wrong skb->protocol in skb_vlan_untag() 2021-03-16 16:34:43 +08:00
dcb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dccp dccp: Fix possible memleak in dccp_init and dccp_fini 2021-03-16 16:29:07 +08:00
decnet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dns_resolver KEYS: Don't write out to userspace while holding key semaphore 2021-03-16 16:26:42 +08:00
dsa net: dsa: declare lockless TX feature for slave ports 2021-03-16 16:28:42 +08:00
ethernet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hsr hsr: check protocol version in hsr_newlink() 2021-03-16 16:26:20 +08:00
ieee802154 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ife Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ipv4 net: nexthop: don't allow empty NHA_GROUP 2021-03-16 16:34:43 +08:00
ipv6 netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency 2021-03-16 16:35:05 +08:00
iucv Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
kcm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
key xfrm: policy: match with both mark and mask on user interfaces 2021-03-16 16:32:49 +08:00
l2tp l2tp: remove skb_dst_set() from l2tp_xmit_skb() 2021-03-16 16:31:43 +08:00
l3mdev Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
lapb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
llc llc: make sure applications use ARPHRD_ETHER 2021-03-16 16:31:43 +08:00
mac80211 mac80211: fix misplaced while instead of if 2021-03-16 16:34:06 +08:00
mac802154 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mpls Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ncsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
netfilter netfilter: nf_tables: nft_exthdr: the presence return value should be little-endian 2021-03-16 16:34:35 +08:00
netlabel netlabel: cope with NULL catmap 2021-03-16 16:27:47 +08:00
netlink genetlink: remove genl_bind 2021-03-16 16:31:42 +08:00
netrom net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node 2021-03-16 16:26:51 +08:00
nfc net/nfc/rawsock.c: add CAP_NET_RAW check. 2021-03-16 16:33:48 +08:00
nsh Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
openvswitch openvswitch: Prevent kernel-infoleak in ovs_ct_put_key() 2021-03-16 16:33:10 +08:00
packet af_packet: TPACKET_V3: fix fill status rwlock imbalance 2021-03-16 16:33:48 +08:00
phonet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
psample Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
qrtr net: qrtr: fix usage of idr in port assignment to socket 2021-03-16 16:34:43 +08:00
rds rds: Prevent kernel-infoleak in rds_notify_queue_get() 2021-03-16 16:32:48 +08:00
rfkill Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rose Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rxrpc rxrpc: Fix race between recvmsg and sendmsg on immediate call failure 2021-03-16 16:33:09 +08:00
sched net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow 2021-03-16 16:34:44 +08:00
sctp net: sctp: Fix negotiation of the number of data streams. 2021-03-16 16:34:44 +08:00
smc net/smc: Prevent kernel-infoleak in __smc_diag_dump() 2021-03-16 16:34:44 +08:00
strparser Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sunrpc svcrdma: Fix another Receive buffer leak 2021-03-16 16:34:32 +08:00
switchdev Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tipc tipc: fix uninit skb->data in tipc_nl_compat_dumpit() 2021-03-16 16:34:44 +08:00
tls net/tls: Fix kmap usage 2021-03-16 16:33:49 +08:00
toa Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
unix Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vmw_vsock vsock/virtio: annotate 'the_virtio_vsock' RCU pointer 2021-03-16 16:32:24 +08:00
wimax Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
wireless cfg80211: check vendor command doit pointer before use 2021-03-16 16:33:07 +08:00
x25 net/x25: Fix null-ptr-deref in x25_disconnect 2021-03-16 16:32:48 +08:00
xdp xdp: Fix xsk_generic_xmit errno 2021-03-16 16:30:35 +08:00
xfrm xfrm: policy: match with both mark and mask on user interfaces 2021-03-16 16:32:49 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
compat.c net/compat: Add missing sock updates for SCM_RIGHTS 2021-03-16 16:34:05 +08:00
socket.c net: Set fput_needed iff FDPUT_FPUT is set 2021-03-16 16:33:49 +08:00
sysctl_net.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00