Commit 02d9c6e
ksmbd: fix potential UAF
After calling opinfo_put(), the opinfo may be freed, then using this
opinfo in the next traversal will cause UAF bug.
To fix it, swap the call order of opinfo_put() and rcu_read_lock(), so
that the opinfo_free_rcu() will not be called, and the opinfo will not be
freed, then we can safely perform the next traversal.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Qi Zheng <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>1 parent d6fb37b commit 02d9c6e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
1236 | | - | |
1237 | 1236 | | |
| 1237 | + | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| |||
1561 | 1561 | | |
1562 | 1562 | | |
1563 | 1563 | | |
1564 | | - | |
1565 | 1564 | | |
| 1565 | + | |
1566 | 1566 | | |
1567 | 1567 | | |
1568 | 1568 | | |
| |||
1986 | 1986 | | |
1987 | 1987 | | |
1988 | 1988 | | |
1989 | | - | |
1990 | 1989 | | |
| 1990 | + | |
1991 | 1991 | | |
1992 | 1992 | | |
1993 | 1993 | | |
| |||
0 commit comments