Skip to content
  1. Jan 28, 2023
  2. Jan 27, 2023
    • Kui-Feng Lee's avatar
      bpf: Fix the kernel crash caused by bpf_setsockopt(). · 5416c9ae
      Kui-Feng Lee authored
      The kernel crash was caused by a BPF program attached to the
      "lsm_cgroup/socket_sock_rcv_skb" hook, which performed a call to
      `bpf_setsockopt()` in order to set the TCP_NODELAY flag as an
      example. Flags like TCP_NODELAY can prompt the kernel to flush a
      socket's outgoing queue, and this hook
      "lsm_cgroup/socket_sock_rcv_skb" is frequently triggered by
      softirqs. The issue was that in certain circumstances, when
      `tcp_write_xmit()` was called to flush the queue, it would also allow
      BH (bottom-half) to run. This could lead to our program attempting to
      flush the same socket recursively, which caused a `skbuff` to be
      unlinked twice.
      
      `security_sock_rcv_skb()` is triggered by `tcp_filter()`. This occurs
      before the sock ownership is checked in `tcp_v4_rcv()`. Consequently,
      if a bpf program runs on `security_sock_rcv_skb()` while under softirq
      conditions, it may not possess the lock needed for `bpf_setsockopt()`,
      thus presenting an issue.
      
      The patch fixes this issue by ensuring that a BPF program attached to
      the "lsm_cgroup/socket_sock_rcv_skb" hook is not allowed to call
      `bpf_setsockopt()`.
      
      The differences from v1 are
       - changing commit log to explain holding the lock of the sock,
       - emphasizing that TCP_NODELAY is not the only flag, and
       - adding the fixes tag.
      
      v1: https://lore.kernel.org/bpf/20230125000244.1109228-1-kuifeng@meta.com/
      
      
      
      Signed-off-by: default avatarKui-Feng Lee <kuifeng@meta.com>
      Fixes: 9113d7e4 ("bpf: expose bpf_{g,s}etsockopt to lsm cgroup")
      Link: https://lore.kernel.org/r/20230127001732.4162630-1-kuifeng@meta.com
      
      
      Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      5416c9ae
    • Linus Torvalds's avatar
      Merge tag 'net-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 28b4387f
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from netfilter.
      
        Current release - regressions:
      
         - sched: sch_taprio: do not schedule in taprio_reset()
      
        Previous releases - regressions:
      
         - core: fix UaF in netns ops registration error path
      
         - ipv4: prevent potential spectre v1 gadgets
      
         - ipv6: fix reachability confirmation with proxy_ndp
      
         - netfilter: fix for the set rbtree
      
         - eth: fec: use page_pool_put_full_page when freeing rx buffers
      
         - eth: iavf: fix temporary deadlock and failure to set MAC address
      
        Previous releases - always broken:
      
         - netlink: prevent potential spectre v1 gadgets
      
         - netfilter: fixes for SCTP connection tracking
      
         - mctp: struct sock lifetime fixes
      
         - eth: ravb: fix possible hang if RIS2_QFF1 happen
      
         - eth: tg3: resolve deadlock in tg3_reset_task() during EEH
      
        Misc:
      
         - Mat stepped out as MPTCP co-maintainer"
      
      * tag 'net-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (40 commits)
        net: mdio-mux-meson-g12a: force internal PHY off on mux switch
        docs: networking: Fix bridge documentation URL
        tsnep: Fix TX queue stop/wake for multiple queues
        net/tg3: resolve deadlock in tg3_reset_task() during EEH
        net: mctp: mark socks as dead on unhash, prevent re-add
        net: mctp: hold key reference when looking up a general key
        net: mctp: move expiry timer delete to unhash
        net: mctp: add an explicit reference from a mctp_sk_key to sock
        net: ravb: Fix possible hang if RIS2_QFF1 happen
        net: ravb: Fix lack of register setting after system resumed for Gen3
        net/x25: Fix to not accept on connected socket
        ice: move devlink port creation/deletion
        sctp: fail if no bound addresses can be used for a given scope
        net/sched: sch_taprio: do not schedule in taprio_reset()
        Revert "Merge branch 'ethtool-mac-merge'"
        netrom: Fix use-after-free of a listening socket.
        netfilter: conntrack: unify established states for SCTP paths
        Revert "netfilter: conntrack: add sctp DATA_SENT state"
        netfilter: conntrack: fix bug in for_each_sctp_chunk
        netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE
        ...
      28b4387f
    • Linus Torvalds's avatar
      treewide: fix up files incorrectly marked executable · 262b42e0
      Linus Torvalds authored
      
      
      I'm not exactly clear on what strange workflow causes people to do it,
      but clearly occasionally some files end up being committed as executable
      even though they clearly aren't.
      
      This is a reprise of commit 90fda63f ("treewide: fix up files
      incorrectly marked executable"), just with a different set of files (but
      with the same trivial shell scripting).
      
      So apparently we need to re-do this every five years or so, and Joe
      needs to just keep reminding me to do so ;)
      
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Fixes: 523375c9 ("drm/vmwgfx: Port vmwgfx to arm64")
      Fixes: 5c439937 ("ASoC: codecs: add support for ES8326")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      262b42e0
  3. Jan 26, 2023
  4. Jan 25, 2023