History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from David Miller: "Another week, another set of bug fixes: 1) Fix pskb_pull length in __xfrm_transport_prep(), from Xin Long. 2) Fix double xfrm_state put in esp{4,6}_gro_receive(), also from Xin Long. 3) Re-arm discovery timer properly in mac80211 mesh code, from Linus Lüssing. 4) Prevent buffer overflows in nf_conntrack_pptp debug code, from Pablo Neira Ayuso. 5) Fix race in ktls code between tls_sw_recvmsg() and tls_decrypt_done(), from Vinay Kumar Yadav. 6) Fix crashes on TCP fallback in MPTCP code, from Paolo Abeni. 7) More validation is necessary of untrusted GSO packets coming from virtualization devices, from Willem de Bruijn. 8) Fix endianness of bnxt_en firmware message length accesses, from Edwin Peer. 9) Fix infinite loop in sch_fq_pie, from Davide Caratti. 10) Fix lockdep splat in DSA by setting lockless TX in netdev features for slave ports, from Vladimir Oltean. 11) Fix suspend/resume crashes in mlx5, from Mark Bloch. 12) Fix use after free in bpf fmod_ret, from Alexei Starovoitov. 13) ARP retransmit timer guard uses wrong offset, from Hongbin Liu. 14) Fix leak in inetdev_init(), from Yang Yingliang. 15) Don't try to use inet hash and unhash in l2tp code, results in crashes. From Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (77 commits) l2tp: add sk_family checks to l2tp_validate_socket l2tp: do not use inet_hash()/inet_unhash() net: qrtr: Allocate workqueue before kernel_bind mptcp: remove msk from the token container at destruction time. mptcp: fix race between MP_JOIN and close mptcp: fix unblocking connect() net/sched: act_ct: add nat mangle action only for NAT-conntrack devinet: fix memleak in inetdev_init() virtio_vsock: Fix race condition in virtio_transport_recv_pkt drivers/net/ibmvnic: Update VNIC protocol version reporting NFC: st21nfca: add missed kfree_skb() in an error path neigh: fix ARP retransmit timer guard bpf, selftests: Add a verifier test for assigning 32bit reg states to 64bit ones bpf, selftests: Verifier bounds tests need to be updated bpf: Fix a verifier issue when assigning 32bit reg states to 64bit ones bpf: Fix use-after-free in fmod_ret check net/mlx5e: replace EINVAL in mlx5e_flower_parse_meta() net/mlx5e: Fix MLX5_TC_CT dependencies net/mlx5e: Properly set default values when disabling adaptive moderation net/mlx5e: Fix arch depending casting issue in FEC ...

Linus Torvalds committed 6 years ago

Commit 19835b12 parents ffeb595 d9a81a269 files · +806 −337Browse files

Showing the changes to include/linux (3 of 69 files). Show all

Unified · Split

3 files
  1. include/linux/ieee80211.h +1 −1
  2. include/linux/netfilter/nf_conntrack_pptp.h +1 −1
  3. include/linux/virtio_net.h +18 −7
include/linux/ieee80211.h+1−1
@@ -2047,7 +2047,7 @@ ieee80211_he_ppe_size(u8 ppe_thres_hdr, const u8 *phy_cap_info) · 2046 unmodified lines
20472047 }
20482048
20492049 /* HE Operation defines */
2050−#define IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK 0x00000003
2050+#define IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK 0x00000007
20512051 #define IEEE80211_HE_OPERATION_TWT_REQUIRED 0x00000008
20522052 #define IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK 0x00003ff0
20532053 #define IEEE80211_HE_OPERATION_RTS_THRESHOLD_OFFSET 4
include/linux/netfilter/nf_conntrack_pptp.h+1−1
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 #include <net/netfilter/nf_conntrack_expect.h>
1111 #include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
1212
13−extern const char *const pptp_msg_name[];
13+const char *pptp_msg_name(u_int16_t msg);
1414
1515 /* state of the control session */
1616 enum pptp_ctrlsess_state {
include/linux/virtio_net.h+18−7
@@ -31,6 +31,7 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 30 unmodified lines
3131 {
3232 unsigned int gso_type = 0;
3333 unsigned int thlen = 0;
34+ unsigned int p_off = 0;
3435 unsigned int ip_proto;
3536
3637 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
@@ -68,7 +69,8 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 31 unmodified lines
6869 if (!skb_partial_csum_set(skb, start, off))
6970 return -EINVAL;
7071
71− if (skb_transport_offset(skb) + thlen > skb_headlen(skb))
72+ p_off = skb_transport_offset(skb) + thlen;
73+ if (p_off > skb_headlen(skb))
7274 return -EINVAL;
7375 } else {
7476 /* gso packets without NEEDS_CSUM do not set transport_offset.
@@ -92,23 +94,32 @@ retry: · 17 unmodified lines
9294 return -EINVAL;
9395 }
9496
95− if (keys.control.thoff + thlen > skb_headlen(skb) ||
97+ p_off = keys.control.thoff + thlen;
98+ if (p_off > skb_headlen(skb) ||
9699 keys.basic.ip_proto != ip_proto)
97100 return -EINVAL;
98101
99102 skb_set_transport_header(skb, keys.control.thoff);
103+ } else if (gso_type) {
104+ p_off = thlen;
105+ if (p_off > skb_headlen(skb))
106+ return -EINVAL;
100107 }
101108 }
102109
103110 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
104111 u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size);
112+ struct skb_shared_info *shinfo = skb_shinfo(skb);
105113
106− skb_shinfo(skb)->gso_size = gso_size;
107− skb_shinfo(skb)->gso_type = gso_type;
114+ /* Too small packets are not really GSO ones. */
115+ if (skb->len - p_off > gso_size) {
116+ shinfo->gso_size = gso_size;
117+ shinfo->gso_type = gso_type;
108118
109− /* Header must be checked, and gso_segs computed. */
110− skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY;
111− skb_shinfo(skb)->gso_segs = 0;
119+ /* Header must be checked, and gso_segs computed. */
120+ shinfo->gso_type |= SKB_GSO_DODGY;
121+ shinfo->gso_segs = 0;
122+ }
112123 }
113124
114125 return 0;