Commit ff23cc7
committed
netfilter: nf_tables: reject QUEUE/DROP verdict parameters
jira LE-831
cve CVE-2024-1086
commit f342de4
This reverts commit e0abdad.
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: e0abdad ("netfilter: nf_tables: accept QUEUE/DROP verdict parameters")
Cc: [email protected]
Reported-by: Notselwyn <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
(cherry picked from commit f342de4)
Signed-off-by: Jonathan Maple <[email protected]>1 parent ed68277 commit ff23cc7
1 file changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9713 | 9713 | | |
9714 | 9714 | | |
9715 | 9715 | | |
9716 | | - | |
9717 | | - | |
9718 | | - | |
9719 | | - | |
9720 | | - | |
9721 | | - | |
9722 | | - | |
9723 | | - | |
9724 | | - | |
9725 | | - | |
| 9716 | + | |
| 9717 | + | |
| 9718 | + | |
| 9719 | + | |
9726 | 9720 | | |
9727 | 9721 | | |
9728 | 9722 | | |
| |||
9756 | 9750 | | |
9757 | 9751 | | |
9758 | 9752 | | |
| 9753 | + | |
| 9754 | + | |
9759 | 9755 | | |
9760 | 9756 | | |
9761 | 9757 | | |
| |||
0 commit comments