1. 01 Sep, 2022 1 commit
    • Khalid Masum's avatar
      xfrm: Update ipcomp_scratches with NULL when freed · 8a04d2fc
      Khalid Masum authored
      Currently if ipcomp_alloc_scratches() fails to allocate memory
      ipcomp_scratches holds obsolete address. So when we try to free the
      percpu scratches using ipcomp_free_scratches() it tries to vfree non
      existent vm area. Described below:
      
      static void * __percpu *ipcomp_alloc_scratches(void)
      {
              ...
              scratches = alloc_percpu(void *);
              if (!scratches)
                      return NULL;
      ipcomp_scratches does not know about this allocation failure.
      Therefore holding the old obsolete address.
              ...
      }
      
      So when we free,
      
      static void ipcomp_free_scratches(void)
      {
              ...
              scratches = ipcomp_scratches;
      Assigning obsolete address from ipcomp_scratches
      
              if (!scratches)
                      return;
      
              for_each_possible_cpu(i)
                     vfree(*per_cpu_ptr(scratches, i));
      Trying to free non existent page, causing warning: trying to vfree
      existent vm area.
              ...
      }
      
      Fix this breakage by updating ipcomp_scrtches with NULL when scratches
      is freed
      Suggested-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Reported-by: syzbot+5ec9bb042ddfe9644773@syzkaller.appspotmail.com
      Tested-by: syzbot+5ec9bb042ddfe9644773@syzkaller.appspotmail.com
      Signed-off-by: default avatarKhalid Masum <khalid.masum.92@gmail.com>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      8a04d2fc
  2. 29 Aug, 2022 1 commit
  3. 27 Aug, 2022 6 commits
  4. 26 Aug, 2022 2 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 2e085ec0
      David S. Miller authored
      Daniel borkmann says:
      
      ====================
      The following pull-request contains BPF updates for your *net* tree.
      
      We've added 11 non-merge commits during the last 14 day(s) which contain
      a total of 13 files changed, 61 insertions(+), 24 deletions(-).
      
      The main changes are:
      
      1) Fix BPF verifier's precision tracking around BPF ring buffer, from Kumar Kartikeya Dwivedi.
      
      2) Fix regression in tunnel key infra when passing FLOWI_FLAG_ANYSRC, from Eyal Birger.
      
      3) Fix insufficient permissions for bpf_sys_bpf() helper, from YiFei Zhu.
      
      4) Fix splat from hitting BUG when purging effective cgroup programs, from Pu Lehui.
      
      5) Fix range tracking for array poke descriptors, from Daniel Borkmann.
      
      6) Fix corrupted packets for XDP_SHARED_UMEM in aligned mode, from Magnus Karlsson.
      
      7) Fix NULL pointer splat in BPF sockmap sk_msg_recvmsg(), from Liu Jian.
      
      8) Add READ_ONCE() to bpf_jit_limit when reading from sysctl, from Kuniyuki Iwashima.
      
      9) Add BPF selftest lru_bug check to s390x deny list, from Daniel Müller.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e085ec0
    • David S. Miller's avatar
      Merge tag 'wireless-2022-08-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless · 4ba9d38b
      David S. Miller authored
      Johannes Berg says:
      
      ====================
      pull-request: wireless-2022-08-26
      
      Here are a couple of fixes for the current cycle,
      see the tag description below.
      
      Just a couple of fixes:
       * two potential leaks
       * use-after-free in certain scan races
       * warning in IBSS code
       * error return from a debugfs file was wrong
       * possible NULL-ptr-deref when station lookup fails
      
      Please pull and let me know if there's any problem.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ba9d38b
  5. 25 Aug, 2022 30 commits