Commit b1df305
committed
netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
jira VULN-4906
cve CVE-2024-26925
commit-author Pablo Neira Ayuso <[email protected]>
commit 0d459e2
The commit mutex should not be released during the critical section
between nft_gc_seq_begin() and nft_gc_seq_end(), otherwise, async GC
worker could collect expired objects and get the released commit lock
within the same GC sequence.
nf_tables_module_autoload() temporarily releases the mutex to load
module dependencies, then it goes back to replay the transaction again.
Move it at the end of the abort phase after nft_gc_seq_end() is called.
Cc: [email protected]
Fixes: 7203443 ("netfilter: nf_tables: GC transaction race with abort path")
Reported-by: Kuan-Ting Chen <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
(cherry picked from commit 0d459e2)
Signed-off-by: Marcin Wcisło <[email protected]>1 parent 96c6b6f commit b1df305
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9923 | 9923 | | |
9924 | 9924 | | |
9925 | 9925 | | |
9926 | | - | |
9927 | | - | |
9928 | | - | |
9929 | | - | |
9930 | | - | |
9931 | 9926 | | |
9932 | 9927 | | |
9933 | 9928 | | |
| |||
9944 | 9939 | | |
9945 | 9940 | | |
9946 | 9941 | | |
| 9942 | + | |
| 9943 | + | |
| 9944 | + | |
| 9945 | + | |
| 9946 | + | |
| 9947 | + | |
| 9948 | + | |
| 9949 | + | |
9947 | 9950 | | |
9948 | 9951 | | |
9949 | 9952 | | |
| |||
0 commit comments