In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftsetrbtree: fix null deref on element insertion
There is no guarantee that rbprev() will not return NULL in nftrbtreegcelem():
general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] nftaddsetelem+0x14b0/0x2990 nftables_newsetelem+0x528/0xb30
Furthermore, there is a possible use-after-free while iterating, 'node' can be free'd so we need to cache the next value to use.