1. 23 Jan, 2020 36 commits
  2. 14 Jan, 2020 4 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.9.210 · 36fa7559
      Greg Kroah-Hartman authored
      36fa7559
    • Akeem G Abodunrin's avatar
      drm/i915/gen9: Clear residual context state on context switch · 57123333
      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>
      57123333
    • Florian Westphal's avatar
      netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present · a6280b60
      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>
      a6280b60
    • Florian Westphal's avatar
      netfilter: arp_tables: init netns pointer in xt_tgchk_param struct · 76c146ce
      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>
      76c146ce