Commit 91ee7a6
committed
netfilter: nf_tables: release batch on table validation from abort path
jira VULN-4906
cve-pre CVE-2024-26925
commit-author Pablo Neira Ayuso <[email protected]>
commit a45e688
Unlike early commit path stage which triggers a call to abort, an
explicit release of the batch is required on abort, otherwise mutex is
released and commit_list remains in place.
Add WARN_ON_ONCE to ensure commit_list is empty from the abort path
before releasing the mutex.
After this patch, commit_list is always assumed to be empty before
grabbing the mutex, therefore
03c1f1e ("netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()")
only needs to release the pending modules for registration.
Cc: [email protected]
Fixes: c0391b6 ("netfilter: nf_tables: missing validation from the abort path")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
(cherry picked from commit a45e688)
Signed-off-by: Marcin Wcisło <[email protected]>1 parent 38c2e5c commit 91ee7a6
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9888 | 9888 | | |
9889 | 9889 | | |
9890 | 9890 | | |
| 9891 | + | |
9891 | 9892 | | |
9892 | 9893 | | |
9893 | 9894 | | |
9894 | | - | |
| 9895 | + | |
9895 | 9896 | | |
9896 | 9897 | | |
9897 | 9898 | | |
| |||
10073 | 10074 | | |
10074 | 10075 | | |
10075 | 10076 | | |
10076 | | - | |
| 10077 | + | |
10077 | 10078 | | |
10078 | 10079 | | |
10079 | 10080 | | |
| |||
10086 | 10087 | | |
10087 | 10088 | | |
10088 | 10089 | | |
| 10090 | + | |
| 10091 | + | |
| 10092 | + | |
10089 | 10093 | | |
10090 | 10094 | | |
10091 | 10095 | | |
| |||
10883 | 10887 | | |
10884 | 10888 | | |
10885 | 10889 | | |
10886 | | - | |
10887 | | - | |
10888 | | - | |
| 10890 | + | |
| 10891 | + | |
| 10892 | + | |
| 10893 | + | |
10889 | 10894 | | |
10890 | 10895 | | |
10891 | 10896 | | |
| |||
0 commit comments