1. 21 Mar, 2022 4 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next · 4b45e079
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next.
      This patchset contains updates for the nf_tables register tracking
      infrastructure, disable bogus warning when attaching ct helpers,
      one namespace pollution fix and few cleanups for the flowtable.
      
      1) Revisit conntrack gc routine to reduce chances of overruning
         the netlink buffer from the event path. From Florian Westphal.
      
      2) Disable warning on explicit ct helper assignment, from Phil Sutter.
      
      3) Read-only expressions do not update registers, mark them as
         NFT_REDUCE_READONLY. Add helper functions to update the register
         tracking information. This patch re-enables the register tracking
         infrastructure.
      
      4) Cancel register tracking in case an expression fully/partially
         clobbers existing data.
      
      5) Add register tracking support for remaining expressions: ct,
         lookup, meta, numgen, osf, hash, immediate, socket, xfrm, tunnel,
         fib, exthdr.
      
      6) Rename init and exit functions for the conntrack h323 helper,
         from Randy Dunlap.
      
      7) Remove redundant field in struct flow_offload_work.
      
      8) Update nf_flow_table_iterate() to pass flowtable to callback.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b45e079
    • Casper Andersson's avatar
      net: sparx5: Use vid 1 when bridge default vid 0 to avoid collision · e6980b57
      Casper Andersson authored
      Standalone ports use vid 0. Let the bridge use vid 1 when
      "vlan_default_pvid 0" is set to avoid collisions. Since no
      VLAN is created when default pvid is 0 this is set
      at "PORT_ATTR_SET" and handled in the Switchdev fdb handler.
      Signed-off-by: default avatarCasper Andersson <casper.casan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6980b57
    • Wan Jiabing's avatar
      qed: remove unnecessary memset in qed_init_fw_funcs · b8f7544a
      Wan Jiabing authored
      allocated_mem is allocated by kcalloc(). The memory is set to zero.
      It is unnecessary to call memset again.
      Signed-off-by: default avatarWan Jiabing <wanjiabing@vivo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8f7544a
    • Wang Yufen's avatar
      netlabel: fix out-of-bounds memory accesses · f22881de
      Wang Yufen authored
      In calipso_map_cat_ntoh(), in the for loop, if the return value of
      netlbl_bitmap_walk() is equal to (net_clen_bits - 1), when
      netlbl_bitmap_walk() is called next time, out-of-bounds memory accesses
      of bitmap[byte_offset] occurs.
      
      The bug was found during fuzzing. The following is the fuzzing report
       BUG: KASAN: slab-out-of-bounds in netlbl_bitmap_walk+0x3c/0xd0
       Read of size 1 at addr ffffff8107bf6f70 by task err_OH/252
      
       CPU: 7 PID: 252 Comm: err_OH Not tainted 5.17.0-rc7+ #17
       Hardware name: linux,dummy-virt (DT)
       Call trace:
        dump_backtrace+0x21c/0x230
        show_stack+0x1c/0x60
        dump_stack_lvl+0x64/0x7c
        print_address_description.constprop.0+0x70/0x2d0
        __kasan_report+0x158/0x16c
        kasan_report+0x74/0x120
        __asan_load1+0x80/0xa0
        netlbl_bitmap_walk+0x3c/0xd0
        calipso_opt_getattr+0x1a8/0x230
        calipso_sock_getattr+0x218/0x340
        calipso_sock_getattr+0x44/0x60
        netlbl_sock_getattr+0x44/0x80
        selinux_netlbl_socket_setsockopt+0x138/0x170
        selinux_socket_setsockopt+0x4c/0x60
        security_socket_setsockopt+0x4c/0x90
        __sys_setsockopt+0xbc/0x2b0
        __arm64_sys_setsockopt+0x6c/0x84
        invoke_syscall+0x64/0x190
        el0_svc_common.constprop.0+0x88/0x200
        do_el0_svc+0x88/0xa0
        el0_svc+0x128/0x1b0
        el0t_64_sync_handler+0x9c/0x120
        el0t_64_sync+0x16c/0x170
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
      Acked-by: default avatarPaul Moore <paul@paul-moore.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f22881de
  2. 19 Mar, 2022 25 commits
  3. 18 Mar, 2022 11 commits