In the Linux kernel, the following vulnerability has been resolved: netfilter: bpf: reject invalid NAT manipulation types As bpf_ct_set_nat_info() is not validating the NAT manipulation type a wrong value can be passed directly to nf_nat_setup_info(). Это запускает WARN_ON() в nf_nat_setup_info(), и если panic_on_warn не установлен, то IPS_SRC_NAT_DONE устанавливается без добавления nat_bysource, и очистка соединения пытается отвязать неинициализированный узел hlist. Исправьте это, проверив правильность типа манипуляции NAT перед вызовом nf_nat_setup_info().
Кроме того, если WARN_ON поражен, верните NF_DROP вместо продолжения обработки, чтобы избежать подобных ситуаций в будущем.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: netfilter: bpf: reject invalid NAT manipulation types As bpf_ct_set_nat_info() is not validating the NAT manipulation type a wrong value can be passed directly to nf_nat_setup_info(). This triggers the WARN_ON() at nf_nat_setup_info() and if panic_on_warn isn't set, then IPS_SRC_NAT_DONE is set without adding nat_bysource and conntrack cleanup tries to unlink an uninitialized hlist node. Fix this by checking that NAT manipulation type is correct before calling nf_nat_setup_info(). In addition, if the WARN_ON is hit, return NF_DROP instead of continuing with the processing to avoid similar situations in the future.