android_kernel_sony_sdm845/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xin Long 176ef96c19 sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment
[ Upstream commit fc228abc2347e106a44c0e9b29ab70b712c4ca51 ]

Jianlin reported a panic when running sctp gso over gre over vlan device:

  [   84.772930] RIP: 0010:do_csum+0x6d/0x170
  [   84.790605] Call Trace:
  [   84.791054]  csum_partial+0xd/0x20
  [   84.791657]  gre_gso_segment+0x2c3/0x390
  [   84.792364]  inet_gso_segment+0x161/0x3e0
  [   84.793071]  skb_mac_gso_segment+0xb8/0x120
  [   84.793846]  __skb_gso_segment+0x7e/0x180
  [   84.794581]  validate_xmit_skb+0x141/0x2e0
  [   84.795297]  __dev_queue_xmit+0x258/0x8f0
  [   84.795949]  ? eth_header+0x26/0xc0
  [   84.796581]  ip_finish_output2+0x196/0x430
  [   84.797295]  ? skb_gso_validate_network_len+0x11/0x80
  [   84.798183]  ? ip_finish_output+0x169/0x270
  [   84.798875]  ip_output+0x6c/0xe0
  [   84.799413]  ? ip_append_data.part.50+0xc0/0xc0
  [   84.800145]  iptunnel_xmit+0x144/0x1c0
  [   84.800814]  ip_tunnel_xmit+0x62d/0x930 [ip_tunnel]
  [   84.801699]  gre_tap_xmit+0xac/0xf0 [ip_gre]
  [   84.802395]  dev_hard_start_xmit+0xa5/0x210
  [   84.803086]  sch_direct_xmit+0x14f/0x340
  [   84.803733]  __dev_queue_xmit+0x799/0x8f0
  [   84.804472]  ip_finish_output2+0x2e0/0x430
  [   84.805255]  ? skb_gso_validate_network_len+0x11/0x80
  [   84.806154]  ip_output+0x6c/0xe0
  [   84.806721]  ? ip_append_data.part.50+0xc0/0xc0
  [   84.807516]  sctp_packet_transmit+0x716/0xa10 [sctp]
  [   84.808337]  sctp_outq_flush+0xd7/0x880 [sctp]

It was caused by SKB_GSO_CB(skb)->csum_start not set in sctp_gso_segment.
sctp_gso_segment() calls skb_segment() with 'feature | NETIF_F_HW_CSUM',
which causes SKB_GSO_CB(skb)->csum_start not to be set in skb_segment().

For TCP/UDP, when feature supports HW_CSUM, CHECKSUM_PARTIAL will be set
and gso_reset_checksum will be called to set SKB_GSO_CB(skb)->csum_start.

So SCTP should do the same as TCP/UDP, to call gso_reset_checksum() when
computing checksum in sctp_gso_segment.

Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:01 +01:00
..
6lowpan 6lowpan: iphc: reset mac_header after decompress to fix panic 2018-10-03 17:01:42 -07:00
9p 9p/net: put a lower bound on msize 2019-01-13 10:03:52 +01:00
802
8021q vlan: also check phy_driver ts_info for vlan's real device 2018-04-13 19:48:34 +02:00
appletalk appletalk: use IS_ENABLED() instead of checking for built-in or module 2016-09-10 21:19:10 -07:00
atm net: atm: Fix potential Spectre v1 2018-05-16 10:08:44 +02:00
ax25 ax25: fix possible use-after-free 2019-02-23 09:05:59 +01:00
batman-adv batman-adv: fix uninit-value in batadv_interface_tx() 2019-02-27 10:07:00 +01:00
bluetooth Bluetooth: Fix unnecessary error message for HCI request completion 2019-02-12 19:44:56 +01:00
bridge net: Fix usage of pskb_trim_rcsum 2019-01-31 08:12:33 +01:00
caif net: caif: Add a missing rcu_read_unlock() in caif_flow_cb 2018-09-05 09:20:00 +02:00
can can: bcm: check timer values before ktime conversion 2019-01-31 08:12:36 +01:00
ceph libceph: handle an empty authorize reply 2019-02-27 10:06:57 +01:00
core net: Do not allocate page fragments that are not skb aligned 2019-02-23 09:05:59 +01:00
dcb net: dcb: For wild-card lookups, use priority -1, not 0 2018-09-19 22:47:15 +02:00
dccp dccp: fool proof ccid_hc_[rt]x_parse_options() 2019-02-12 19:44:59 +01:00
decnet dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock 2018-02-25 11:05:44 +01:00
dns_resolver KEYS: DNS: fix parsing multiple options 2018-07-22 14:27:39 +02:00
dsa net: dsa: slave: Don't propagate flag changes on down slave interfaces 2019-02-12 19:45:00 +01:00
ethernet net: introduce device min_header_len 2017-02-18 15:11:43 +01:00
hsr hsr: fix incorrect warning 2018-04-13 19:48:29 +02:00
ieee802154 ieee802154: lowpan_header_create check must check daddr 2019-01-09 16:16:40 +01:00
ipv4 net: ipv4: use a dedicated counter for icmp_v4 redirect packets 2019-02-23 09:05:59 +01:00
ipv6 sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach() 2019-02-27 10:07:01 +01:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 15:44:41 +02:00
irda irda: Only insert new objects into the global database via setsockopt 2018-09-15 09:43:01 +02:00
iucv net/iucv: Free memory obtained by kzalloc 2018-03-31 18:11:34 +02:00
kcm kcm: Fix use-after-free caused by clonned sockets 2018-06-13 16:16:42 +02:00
key af_key: Always verify length of provided sadb_key 2018-06-16 09:52:32 +02:00
l2tp l2tp: fix reading optional fields of L2TPv3 2019-02-06 17:33:27 +01:00
l3mdev net: ipv6: Remove l3mdev_get_saddr6 2016-09-10 23:12:53 -07:00
lapb
llc llc: do not use sk_eat_skb() 2018-12-01 09:44:19 +01:00
mac80211 mac80211: Free mpath object when rhashtable insertion fails 2019-02-27 10:06:57 +01:00
mac802154 net: mac802154: tx: expand tailroom if necessary 2018-09-09 20:01:19 +02:00
mpls mpls, nospec: Sanitize array index in mpls_label_ok() 2018-03-11 16:21:34 +01:00
ncsi net/ncsi: Improve HNCDSC AEN handler 2016-10-20 11:23:08 -04:00
netfilter netfilter: nf_tables: fix mismatch in big-endian system 2019-02-20 10:18:34 +01:00
netlabel netlabel: check for IPV4MASK in addrinfo_get 2018-10-18 09:13:22 +02:00
netlink netlink: Don't shift on 64 for ngroups 2018-08-09 12:17:59 +02:00
netrom netrom: switch to sock timer API 2019-02-06 17:33:27 +01:00
nfc NFC: Fix possible memory corruption when handling SHDLC I-Frame commands 2018-09-29 03:07:30 -07:00
openvswitch openvswitch: Avoid OOB read when parsing flow nlattrs 2019-01-31 08:12:33 +01:00
packet net/packet: fix 4gb buffer limit due to overflow check 2019-02-27 10:07:00 +01:00
phonet
qrtr net: qrtr: Broadcast messages only from control port 2018-08-24 13:12:36 +02:00
rds rds: fix refcount bug in rds_sock_addref 2019-02-12 19:45:00 +01:00
rfkill rfkill: gpio: fix memory leak in probe error path 2018-05-16 10:08:43 +02:00
rose net/rose: fix NULL ax25_cb kernel panic 2019-02-06 17:33:27 +01:00
rxrpc rxrpc: bad unlock balance in rxrpc_recvmsg 2019-02-12 19:44:59 +01:00
sched net: create skb_gso_validate_mac_len() 2019-02-20 10:18:28 +01:00
sctp sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment 2019-02-27 10:07:01 +01:00
strparser strparser: Fix incorrect strp->need_bytes value. 2018-04-29 11:32:02 +02:00
sunrpc sunrpc: handle ENOMEM in rpcb_getport_async 2019-01-23 08:10:55 +01:00
switchdev switchdev: Execute bridge ndos only for bridge ports 2016-10-19 10:58:04 -04:00
tipc tipc: fix uninit-value in tipc_nl_compat_doit 2019-01-23 08:10:56 +01:00
unix net/unix: don't show information about sockets from other namespaces 2017-11-18 11:22:22 +01:00
vmw_vsock vsock: cope with memory allocation failure at socket creation time 2019-02-23 09:05:58 +01:00
wimax
wireless nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT 2018-11-10 07:42:42 -08:00
x25 net/x25: do not hold the cpu too long in x25_new_lci() 2019-02-23 09:05:59 +01:00
xfrm xfrm: refine validation of template and selector families 2019-02-15 08:07:39 +01:00
compat.c sock: Make sock->sk_stamp thread-safe 2019-01-09 16:16:41 +01:00
Kconfig strparser: Stream parser for messages 2016-08-17 19:36:23 -04:00
Makefile strparser: Stream parser for messages 2016-08-17 19:36:23 -04:00
socket.c net: socket: fix a missing-check bug 2018-11-10 07:42:58 -08:00
sysctl_net.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2016-10-06 09:52:23 -07:00