-
Notifications
You must be signed in to change notification settings - Fork 0
loop: don't change loop device under exclusive opener in loop_set_status #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: linus-master_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: 6da43bb |
83d3e2f to
00d5e5c
Compare
|
Upstream branch: f824272 |
228b41d to
3f0b192
Compare
00d5e5c to
d782508
Compare
|
Upstream branch: f824272 |
3f0b192 to
453e2ab
Compare
d782508 to
6099a4d
Compare
|
Upstream branch: e7c375b |
453e2ab to
77c08d7
Compare
6099a4d to
5121c4d
Compare
|
Upstream branch: e7c375b |
77c08d7 to
5dd6b10
Compare
5121c4d to
4458758
Compare
|
Upstream branch: 8b69055 |
5dd6b10 to
ee40552
Compare
4458758 to
6f43942
Compare
loop_set_status() is allowed to change the loop device while there are other openers of the device, even exclusive ones. In this case, it causes a KASAN: slab-out-of-bounds Read in ext4_search_dir(), since when looking for an entry in an inlined directory, e_value_offs is changed underneath the filesystem by loop_set_status(). Fix the problem by forbidding loop_set_status() from modifying the loop device while there are exclusive openers of the device. This is similar to the fix in loop_configure() by commit 33ec3e5 ("loop: Don't change loop device under exclusive opener") alongside commit ecbe6bc ("block: use bd_prepare_to_claim directly in the loop driver"). Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=3ee481e21fd75e14c397 Tested-by: [email protected] Signed-off-by: Raphael Pinsonneault-Thibeault <[email protected]>
|
Upstream branch: fd95357 |
ee40552 to
3fad0ca
Compare
Pull request for series with
subject: loop: don't change loop device under exclusive opener in loop_set_status
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1023584