1. 17 Jan, 2020 34 commits
  2. 14 Jan, 2020 6 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.19.96 · db5b9190
      Greg Kroah-Hartman authored
      db5b9190
    • Akeem G Abodunrin's avatar
      drm/i915/gen9: Clear residual context state on context switch · dd4f3b35
      Akeem G Abodunrin authored
      commit bc8a76a1 upstream.
      
      Intel ID: PSIRT-TA-201910-001
      CVEID: CVE-2019-14615
      
      Intel GPU Hardware prior to Gen11 does not clear EU state
      during a context switch. This can result in information
      leakage between contexts.
      
      For Gen8 and Gen9, hardware provides a mechanism for
      fast cleardown of the EU state, by issuing a PIPE_CONTROL
      with bit 27 set. We can use this in a context batch buffer
      to explicitly cleardown the state on every context switch.
      
      As this workaround is already in place for gen8, we can borrow
      the code verbatim for Gen9.
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: default avatarAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
      Cc: Kumar Valsan Prathap <prathap.kumar.valsan@intel.com>
      Cc: Chris Wilson <chris.p.wilson@intel.com>
      Cc: Balestrieri Francesco <francesco.balestrieri@intel.com>
      Cc: Bloomfield Jon <jon.bloomfield@intel.com>
      Cc: Dutt Sudeep <sudeep.dutt@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd4f3b35
    • Florian Westphal's avatar
      netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present · 28de8b9c
      Florian Westphal authored
      commit 22dad713 upstream.
      
      The set uadt functions assume lineno is never NULL, but it is in
      case of ip_set_utest().
      
      syzkaller managed to generate a netlink message that calls this with
      LINENO attr present:
      
      general protection fault: 0000 [#1] PREEMPT SMP KASAN
      RIP: 0010:hash_mac4_uadt+0x1bc/0x470 net/netfilter/ipset/ip_set_hash_mac.c:104
      Call Trace:
       ip_set_utest+0x55b/0x890 net/netfilter/ipset/ip_set_core.c:1867
       nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229
       netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
       nfnetlink_rcv+0x1ba/0x460 net/netfilter/nfnetlink.c:563
      
      pass a dummy lineno storage, its easier than patching all set
      implementations.
      
      This seems to be a day-0 bug.
      
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Reported-by: syzbot+34bd2369d38707f3f4a7@syzkaller.appspotmail.com
      Fixes: a7b4f989 ("netfilter: ipset: IP set core support")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      28de8b9c
    • Florian Westphal's avatar
      netfilter: conntrack: dccp, sctp: handle null timeout argument · df39bb2a
      Florian Westphal authored
      commit 1d9a7acd upstream.
      
      The timeout pointer can be NULL which means we should modify the
      per-nets timeout instead.
      
      All do this, except sctp and dccp which instead give:
      
      general protection fault: 0000 [#1] PREEMPT SMP KASAN
      net/netfilter/nf_conntrack_proto_dccp.c:682
       ctnl_timeout_parse_policy+0x150/0x1d0 net/netfilter/nfnetlink_cttimeout.c:67
       cttimeout_default_set+0x150/0x1c0 net/netfilter/nfnetlink_cttimeout.c:368
       nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229
       netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
      
      Reported-by: syzbot+46a4ad33f345d1dd346e@syzkaller.appspotmail.com
      Fixes: c779e849 ("netfilter: conntrack: remove get_timeout() indirection")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      df39bb2a
    • Florian Westphal's avatar
      netfilter: arp_tables: init netns pointer in xt_tgchk_param struct · 46abb2a5
      Florian Westphal authored
      commit 1b789577 upstream.
      
      We get crash when the targets checkentry function tries to make
      use of the network namespace pointer for arptables.
      
      When the net pointer got added back in 2010, only ip/ip6/ebtables were
      changed to initialize it, so arptables has this set to NULL.
      
      This isn't a problem for normal arptables because no existing
      arptables target has a checkentry function that makes use of par->net.
      
      However, direct users of the setsockopt interface can provide any
      target they want as long as its registered for ARP or UNPSEC protocols.
      
      syzkaller managed to send a semi-valid arptables rule for RATEEST target
      which is enough to trigger NULL deref:
      
      kasan: GPF could be caused by NULL-ptr deref or user memory access
      general protection fault: 0000 [#1] PREEMPT SMP KASAN
      RIP: xt_rateest_tg_checkentry+0x11d/0xb40 net/netfilter/xt_RATEEST.c:109
      [..]
       xt_check_target+0x283/0x690 net/netfilter/x_tables.c:1019
       check_target net/ipv4/netfilter/arp_tables.c:399 [inline]
       find_check_entry net/ipv4/netfilter/arp_tables.c:422 [inline]
       translate_table+0x1005/0x1d70 net/ipv4/netfilter/arp_tables.c:572
       do_replace net/ipv4/netfilter/arp_tables.c:977 [inline]
       do_arpt_set_ctl+0x310/0x640 net/ipv4/netfilter/arp_tables.c:1456
      
      Fixes: add67461 ("netfilter: add struct net * to target parameters")
      Reported-by: syzbot+d7358a458d8a81aee898@syzkaller.appspotmail.com
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      46abb2a5
    • Tony Lindgren's avatar
      phy: cpcap-usb: Fix flakey host idling and enumerating of devices · d4296126
      Tony Lindgren authored
      commit 049226b9 upstream.
      
      We must let the USB host idle things properly before we switch to debug
      UART mode. Otherwise the USB host may never idle after disconnecting
      devices, and that causes the next enumeration to be flakey.
      
      Cc: Jacopo Mondi <jacopo@jmondi.org>
      Cc: Marcel Partap <mpartap@gmx.net>
      Cc: Merlijn Wajer <merlijn@wizzup.org>
      Cc: Michael Scott <hashcode0f@gmail.com>
      Cc: NeKit <nekit1000@gmail.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Sebastian Reichel <sre@kernel.org>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Fixes: 6d6ce40f ("phy: cpcap-usb: Add CPCAP PMIC USB support")
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d4296126