1. 14 Jan, 2020 32 commits
  2. 12 Jan, 2020 8 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.9.209 · 753a4bcd
      Greg Kroah-Hartman authored
      753a4bcd
    • Daniele Palmas's avatar
      USB: serial: option: add Telit ME910G1 0x110a composition · 4efc2f0f
      Daniele Palmas authored
      commit 0d3010fa upstream.
      
      This patch adds the following Telit ME910G1 composition:
      
      0x110a: tty, tty, tty, rmnet
      Signed-off-by: default avatarDaniele Palmas <dnlplm@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4efc2f0f
    • Johan Hovold's avatar
      USB: core: fix check for duplicate endpoints · ecaaef6b
      Johan Hovold authored
      commit 3e4f8e21 upstream.
      
      Amend the endpoint-descriptor sanity checks to detect all duplicate
      endpoint addresses in a configuration.
      
      Commit 0a8fd134 ("USB: fix problems with duplicate endpoint
      addresses") added a check for duplicate endpoint addresses within a
      single alternate setting, but did not look for duplicate addresses in
      other interfaces.
      
      The current check would also not detect all duplicate addresses when one
      endpoint is as a (bi-directional) control endpoint.
      
      This specifically avoids overwriting the endpoint entries in struct
      usb_device when enabling a duplicate endpoint, something which could
      potentially lead to crashes or leaks, for example, when endpoints are
      later disabled.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Link: https://lore.kernel.org/r/20191219161016.6695-1-johan@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ecaaef6b
    • Eric Dumazet's avatar
      vlan: fix memory leak in vlan_dev_set_egress_priority · a57180da
      Eric Dumazet authored
      [ Upstream commit 9bbd917e ]
      
      There are few cases where the ndo_uninit() handler might be not
      called if an error happens while device is initialized.
      
      Since vlan_newlink() calls vlan_changelink() before
      trying to register the netdevice, we need to make sure
      vlan_dev_uninit() has been called at least once,
      or we might leak allocated memory.
      
      BUG: memory leak
      unreferenced object 0xffff888122a206c0 (size 32):
        comm "syz-executor511", pid 7124, jiffies 4294950399 (age 32.240s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 61 73 00 00 00 00 00 00 00 00  ......as........
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<000000000eb3bb85>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
          [<000000000eb3bb85>] slab_post_alloc_hook mm/slab.h:586 [inline]
          [<000000000eb3bb85>] slab_alloc mm/slab.c:3320 [inline]
          [<000000000eb3bb85>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3549
          [<000000007b99f620>] kmalloc include/linux/slab.h:556 [inline]
          [<000000007b99f620>] vlan_dev_set_egress_priority+0xcc/0x150 net/8021q/vlan_dev.c:194
          [<000000007b0cb745>] vlan_changelink+0xd6/0x140 net/8021q/vlan_netlink.c:126
          [<0000000065aba83a>] vlan_newlink+0x135/0x200 net/8021q/vlan_netlink.c:181
          [<00000000fb5dd7a2>] __rtnl_newlink+0x89a/0xb80 net/core/rtnetlink.c:3305
          [<00000000ae4273a1>] rtnl_newlink+0x4e/0x80 net/core/rtnetlink.c:3363
          [<00000000decab39f>] rtnetlink_rcv_msg+0x178/0x4b0 net/core/rtnetlink.c:5424
          [<00000000accba4ee>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
          [<00000000319fe20f>] rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442
          [<00000000d51938dc>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
          [<00000000d51938dc>] netlink_unicast+0x223/0x310 net/netlink/af_netlink.c:1328
          [<00000000e539ac79>] netlink_sendmsg+0x2c0/0x570 net/netlink/af_netlink.c:1917
          [<000000006250c27e>] sock_sendmsg_nosec net/socket.c:639 [inline]
          [<000000006250c27e>] sock_sendmsg+0x54/0x70 net/socket.c:659
          [<00000000e2a156d1>] ____sys_sendmsg+0x2d0/0x300 net/socket.c:2330
          [<000000008c87466e>] ___sys_sendmsg+0x8a/0xd0 net/socket.c:2384
          [<00000000110e3054>] __sys_sendmsg+0x80/0xf0 net/socket.c:2417
          [<00000000d71077c8>] __do_sys_sendmsg net/socket.c:2426 [inline]
          [<00000000d71077c8>] __se_sys_sendmsg net/socket.c:2424 [inline]
          [<00000000d71077c8>] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2424
      
      Fixe: 07b5b17e ("[VLAN]: Use rtnl_link API")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a57180da
    • Petr Machata's avatar
      net: sch_prio: When ungrafting, replace with FIFO · f863b71a
      Petr Machata authored
      [ Upstream commit 240ce7f6 ]
      
      When a child Qdisc is removed from one of the PRIO Qdisc's bands, it is
      replaced unconditionally by a NOOP qdisc. As a result, any traffic hitting
      that band gets dropped. That is incorrect--no Qdisc was explicitly added
      when PRIO was created, and after removal, none should have to be added
      either.
      
      Fix PRIO by first attempting to create a default Qdisc and only falling
      back to noop when that fails. This pattern of attempting to create an
      invisible FIFO, using NOOP only as a fallback, is also seen in other
      Qdiscs.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f863b71a
    • Eric Dumazet's avatar
      vlan: vlan_changelink() should propagate errors · 8ed5bb1b
      Eric Dumazet authored
      [ Upstream commit eb8ef2a3 ]
      
      Both vlan_dev_change_flags() and vlan_dev_set_egress_priority()
      can return an error. vlan_changelink() should not ignore them.
      
      Fixes: 07b5b17e ("[VLAN]: Use rtnl_link API")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8ed5bb1b
    • Hangbin Liu's avatar
      vxlan: fix tos value before xmit · 57574c58
      Hangbin Liu authored
      [ Upstream commit 71130f29 ]
      
      Before ip_tunnel_ecn_encap() and udp_tunnel_xmit_skb() we should filter
      tos value by RT_TOS() instead of using config tos directly.
      
      vxlan_get_route() would filter the tos to fl4.flowi4_tos but we didn't
      return it back, as geneve_get_v4_rt() did. So we have to use RT_TOS()
      directly in function ip_tunnel_ecn_encap().
      
      Fixes: 206aaafc ("VXLAN: Use IP Tunnels tunnel ENC encap API")
      Fixes: 1400615d ("vxlan: allow setting ipv6 traffic class")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      57574c58
    • Pengcheng Yang's avatar
      tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK · ea3cc787
      Pengcheng Yang authored
      [ Upstream commit c9655008 ]
      
      When we receive a D-SACK, where the sequence number satisfies:
      	undo_marker <= start_seq < end_seq <= prior_snd_una
      we consider this is a valid D-SACK and tcp_is_sackblock_valid()
      returns true, then this D-SACK is discarded as "old stuff",
      but the variable first_sack_index is not marked as negative
      in tcp_sacktag_write_queue().
      
      If this D-SACK also carries a SACK that needs to be processed
      (for example, the previous SACK segment was lost), this SACK
      will be treated as a D-SACK in the following processing of
      tcp_sacktag_write_queue(), which will eventually lead to
      incorrect updates of undo_retrans and reordering.
      
      Fixes: fd6dad61 ("[TCP]: Earlier SACK block verification & simplify access to them")
      Signed-off-by: default avatarPengcheng Yang <yangpc@wangsu.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ea3cc787