Go to file
Fuhai Wang 47f0d31be8 netfilter: nf_tables: reject QUEUE/DROP verdict parameters
commit f342de4e2f33e0e39165d8639387aa6c19dff660 upstream.

This reverts commit e0abdadcc6.

core.c:nf_hook_slow assumes that the upper 16 bits of NF_DROP
verdicts contain a valid errno, i.e. -EPERM, -EHOSTUNREACH or similar,
or 0.

Due to the reverted commit, its possible to provide a positive
value, e.g. NF_ACCEPT (1), which results in use-after-free.

Its not clear to me why this commit was made.

NF_QUEUE is not used by nftables; "queue" rules in nftables
will result in use of "nft_queue" expression.

If we later need to allow specifiying errno values from userspace
(do not know why), this has to call NF_DROP_GETERR and check that
"err <= 0" holds true.

Fixes: e0abdadcc6 ("netfilter: nf_tables: accept QUEUE/DROP verdict parameters")
Cc: stable@vger.kernel.org
Reported-by: Notselwyn <notselwyn@pwning.tech>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuhai Wang <fuhaiwang@tencent.com>
Signed-off-by: caelli <caelli@tencent.com>
2024-06-11 20:52:46 +08:00
Documentation intel_idle: Introduce 'states_off' module parameter 2024-06-11 20:51:22 +08:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
arch powerpc: export arch_trigger_cpumask_backtrace 2024-06-11 20:52:44 +08:00
block block: fix the incorrect spin_lock_irq to spin_lock 2024-06-11 20:44:39 +08:00
certs ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
crypto ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
dist dist: provide kernel version info in kernel*core*.rpm 2024-06-11 20:52:42 +08:00
drivers PCI/MSI: Set device flag indicating only 32-bit MSI support 2024-06-11 20:52:46 +08:00
fs fsnotify: invalidate dcache before IN_DELETE event 2024-06-11 20:52:41 +08:00
include fsnotify: invalidate dcache before IN_DELETE event 2024-06-11 20:52:41 +08:00
init irqlatency: add irq latency monitor support 2024-06-11 20:40:51 +08:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2024-06-11 20:44:39 +08:00
kernel x86, arm64: Add ARCH_WANT_RESERVE_CRASH_KERNEL config 2024-06-11 20:51:00 +08:00
lib libfdt: include fdt_addresses.c 2024-06-11 20:51:02 +08:00
mm mm: make wait_on_page_writeback() wait for multiple pending writebacks 2024-06-11 20:51:18 +08:00
net netfilter: nf_tables: reject QUEUE/DROP verdict parameters 2024-06-11 20:52:46 +08:00
package config: enable BFQ io scheduler 2024-06-11 20:50:53 +08:00
samples ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
scripts ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
security security: Fix hook iteration for secid_to_secctx 2024-06-11 20:50:15 +08:00
sound ALSA: pcm: Fix races among concurrent hw_params and hw_free calls 2024-06-11 20:41:27 +08:00
tools ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
usr tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
virt KVM: Do not leak memory for duplicate debugfs directories 2024-06-11 20:51:18 +08:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
.gitignore ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS Phytium JPEG Encoder driver 2024-06-11 20:41:01 +08:00
Makefile ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
README.md tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
backport_remove_lists.txt tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
tools_key.pub tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00

README.md

Tencent Linux Kernel 4.0