Commit 043c592
committed
drivers:md:fix a potential use-after-free bug
jira VULN-69330
cve CVE-2022-50022
commit-author Wentao_Liang <Wentao_Liang_g@163.com>
commit 1042124
In line 2884, "raid5_release_stripe(sh);" drops the reference to sh and
may cause sh to be released. However, sh is subsequently used in lines
2886 "if (sh->batch_head && sh != sh->batch_head)". This may result in an
use-after-free bug.
It can be fixed by moving "raid5_release_stripe(sh);" to the bottom of
the function.
Signed-off-by: Wentao_Liang <Wentao_Liang_g@163.com>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 1042124)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent e1d81f6 commit 043c592
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2904 | 2904 | | |
2905 | 2905 | | |
2906 | 2906 | | |
2907 | | - | |
2908 | 2907 | | |
2909 | 2908 | | |
2910 | 2909 | | |
| 2910 | + | |
2911 | 2911 | | |
2912 | 2912 | | |
2913 | 2913 | | |
| |||
0 commit comments