Commit 2064a27
committed
net/sched: cls_fw: Fix improper refcount update leads to use-after-free
jira LE-1907
cve CVE-2023-3776
Rebuild_History Non-Buildable kernel-5.14.0-284.30.1.el9_2
commit-author M A Ramdhan <[email protected]>
commit 0323bce
In the event of a failure in tcf_change_indev(), fw_set_parms() will
immediately return an error after incrementing or decrementing
reference counter in tcf_bind_filter(). If attacker can control
reference counter to zero and make reference freed, leading to
use after free.
In order to prevent this, move the point of possible failure above the
point where the TC_FW_CLASSID is handled.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Reported-by: M A Ramdhan <[email protected]>
Signed-off-by: M A Ramdhan <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Reviewed-by: Pedro Tammela <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit 0323bce)
Signed-off-by: Jonathan Maple <[email protected]>1 parent 075c8d3 commit 2064a27
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 213 | | |
219 | 214 | | |
220 | 215 | | |
| |||
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
0 commit comments