Commit 96c6b6f
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 018fea0 commit 96c6b6f
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9749 | 9749 | | |
9750 | 9750 | | |
9751 | 9751 | | |
| 9752 | + | |
9752 | 9753 | | |
9753 | 9754 | | |
9754 | 9755 | | |
9755 | | - | |
| 9756 | + | |
9756 | 9757 | | |
9757 | 9758 | | |
9758 | 9759 | | |
| |||
9927 | 9928 | | |
9928 | 9929 | | |
9929 | 9930 | | |
9930 | | - | |
| 9931 | + | |
9931 | 9932 | | |
9932 | 9933 | | |
9933 | 9934 | | |
| |||
9940 | 9941 | | |
9941 | 9942 | | |
9942 | 9943 | | |
| 9944 | + | |
| 9945 | + | |
| 9946 | + | |
9943 | 9947 | | |
9944 | 9948 | | |
9945 | 9949 | | |
| |||
10737 | 10741 | | |
10738 | 10742 | | |
10739 | 10743 | | |
10740 | | - | |
10741 | | - | |
10742 | | - | |
| 10744 | + | |
| 10745 | + | |
| 10746 | + | |
| 10747 | + | |
10743 | 10748 | | |
10744 | 10749 | | |
10745 | 10750 | | |
| |||
0 commit comments