mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
Changes since last update:
- Fix a UAF of sbi->sync_decompress when compressed I/Os
race with unmount
- Fix a regression introduced this development cycle that
incorrectly rejects multiple-algorithm images
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmoiGEoRHHhpYW5nQGtl
cm5lbC5vcmcACgkQUXZn5Zlu5qrkCQ/9HTsNbR3k+xFvSd7wNtV3s2pKRX2ctEVn
KWiOk5ZNRWUWImL7a0gEwjGtkGPDg4yXWHQnm0hPO6bBqXOXoPuDomsSDC5EzvQ+
ID2dxkc+nJeg9MkiKEY3W78yTkOI8Xrn8ZYi02U30Vk0vzWiiEnJG9pKp6XTheAi
zRA2iqoiE00wTbAZCW3xqyHcw2djBRuaBYPYycHJCw3D+sVcnuVrLUeeFNKXsar1
p2FG+9tzPgMhMFJgTkiD7SA0dmRp4PoJsY1d1P1uuqBJ/PFWmWTbnCmNvUZUQFcR
d2rT0jxlW4oA+lzP/RT0lDmvR3howEy4F+gLlsh8jYO5RmtLyAv5gVzxqugN0Jc4
ZSRX6qgVYhsHe/DzbPIbZFjcWUNs7Q1gS6NwUhjlZ9r4CJ2Yh/n43koPWwJB/xTt
HmkSuaOatu5zDHvohlbX2AAoxALDs+fO9lu9C9cgCAx/dS01zdgUyCWYIH43+OAp
BveL+jmzdzLnMakCs3ImsrgTZXxqrmCe0HgsCVjqGsmDCk8y3CDmMhG1EYn0bOgA
OnbkGj2Q/MmXJbrgsogOgc6oIg+sFf1GzMiNFeUTm7nSHgmoqI2f+aTMz9qNmKZu
9XPvyzfPFF/0NPxF9c0e7bwiMyaZLXaHn1wG2eXbubSQbIxRBmnid8XiA/SaOHUq
kY6gkXUB+4k=
=CHHg
-----END PGP SIGNATURE-----
Merge tag 'erofs-for-7.1-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs fixes from Gao Xiang:
- Fix a UAF of sbi->sync_decompress when compressed I/Os
race with unmount
- Fix a regression introduced this development cycle that
incorrectly rejects multiple-algorithm images
* tag 'erofs-for-7.1-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: fix EFSCORRUPTED on multi-algorithm images in z_erofs_map_sanity_check()
erofs: fix use-after-free on sbi->sync_decompress
This commit is contained in:
commit
2b389a573b
|
|
@ -1455,6 +1455,9 @@ static void z_erofs_decompress_kickoff(struct z_erofs_decompressqueue *io,
|
|||
if (atomic_add_return(bios, &io->pending_bios))
|
||||
return;
|
||||
if (z_erofs_in_atomic()) {
|
||||
/* See `sync_decompress` in sysfs-fs-erofs for more details */
|
||||
if (sbi->sync_decompress == EROFS_SYNC_DECOMPRESS_AUTO)
|
||||
sbi->sync_decompress = EROFS_SYNC_DECOMPRESS_FORCE_ON;
|
||||
#ifdef CONFIG_EROFS_FS_PCPU_KTHREAD
|
||||
struct kthread_worker *worker;
|
||||
|
||||
|
|
@ -1471,9 +1474,6 @@ static void z_erofs_decompress_kickoff(struct z_erofs_decompressqueue *io,
|
|||
#else
|
||||
queue_work(z_erofs_workqueue, &io->u.work);
|
||||
#endif
|
||||
/* See `sync_decompress` in sysfs-fs-erofs for more details */
|
||||
if (sbi->sync_decompress == EROFS_SYNC_DECOMPRESS_AUTO)
|
||||
sbi->sync_decompress = EROFS_SYNC_DECOMPRESS_FORCE_ON;
|
||||
return;
|
||||
}
|
||||
gfp_flag = memalloc_noio_save();
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ static int z_erofs_map_sanity_check(struct inode *inode,
|
|||
}
|
||||
|
||||
if (map->m_algorithmformat < Z_EROFS_COMPRESSION_MAX) {
|
||||
if (sbi->available_compr_algs ^ BIT(map->m_algorithmformat)) {
|
||||
if (!(sbi->available_compr_algs & BIT(map->m_algorithmformat))) {
|
||||
erofs_err(inode->i_sb, "inconsistent algorithmtype %u for nid %llu",
|
||||
map->m_algorithmformat, EROFS_I(inode)->nid);
|
||||
return -EFSCORRUPTED;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user