1. 17 May, 2023 12 commits
  2. 16 May, 2023 7 commits
  3. 15 May, 2023 20 commits
  4. 14 May, 2023 1 commit
    • Martin KaFai Lau's avatar
      Merge branch 'bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen' · 79b3604d
      Martin KaFai Lau authored
      Stanislav Fomichev says:
      
      ====================
      optval larger than PAGE_SIZE leads to EFAULT if the BPF program
      isn't careful enough. This is often overlooked and might break
      completely unrelated socket options. Instead of EFAULT,
      let's ignore BPF program buffer changes. See the first patch for
      more info.
      
      In addition, clearly document this corner case and reset optlen
      in our selftests (in case somebody copy-pastes from them).
      
      v6:
      - no changes; resending due to screwing up v5 series with the unrelated
        patch
      
      v5:
      - goto in the selftest (Martin)
      - set IP_TOS to zero to avoid endianness complications (Martin)
      
      v4:
      - ignore retval as well when optlen > PAGE_SIZE (Martin)
      
      v3:
      - don't hard-code PAGE_SIZE (Martin)
      - reset orig_optlen in getsockopt when kernel part succeeds (Martin)
      ====================
      Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      79b3604d