mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
Changes since last update:
- Add Chunhai Guo as a EROFS reviewer to get more eyes from interested
industry vendors
- Fix infinite loop caused by incomplete craftd zstd-compressed data
(thanks to Robert again!)
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmkVxhYRHHhpYW5nQGtl
cm5lbC5vcmcACgkQUXZn5Zlu5qoi6w//dVdWvSf8pTqFjbifGHD/9tdNdRam4Rud
CLQinSvrDGKnwalhdOEp9DbWX0toN9f2aCdzBe4XFFjXurBYykc0GmoMUFuJCsYG
HaxNjvcr54FPwIqbDOR1cpX1qD/1Ctk1w1wjdcAqXGt3fME4rGwozjYY0iUEtQdQ
8vz+qL5kksIfqVtzI5uweUAUkt5S9NJprhB1WFvP+OB/7RPMxGHs5k0gqzImIlxe
dcODibFX5rPVguoMF9r0R10+FVMmBOfCGnlIMNoK5IGmJZLnZSWVSWQRUJk4Qvod
/4cqTknI06Jtwf3rk6oSaMXKt0I9jWrFT6iEqRN2COuMIUr5J44ADEguGvPSpq/s
8DG/JLOn3c3hdHQcA9QlXGUuEWV8Zn0jaaW4NGT+AF7JtnEC39rg3JO3cvVDDfMF
IDxFi0EnmO3VBvPfbnzSaA41uxIKL0rgbbMzzoJprKmVlhuDluA10ZzXfbTJo2ru
o9801mIifmSs/uGfpiiYNlKDOiAOgrgO43NnXfQtmfAUnPF8hEnPyqV6Qzcrz89W
S2mQ3WvpCbcHQBRtednnsI7vbl/p9+yS6/aEg+WQChnBpua4iQuFg0Gj5mTvXiBs
4EwsYj10n+YxjAZAD0KpKvRqM5Qct5bbYdUv/qKyK41ZXO1kLMkhpB1weNy99Hhd
gV9+AfoKCt0=
=i7tY
-----END PGP SIGNATURE-----
Merge tag 'erofs-for-6.18-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs fixes from Gao Xiang:
- Add Chunhai Guo as a EROFS reviewer to get more eyes from interested
industry vendors
- Fix infinite loop caused by incomplete crafted zstd-compressed data
(thanks to Robert again!)
* tag 'erofs-for-6.18-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: avoid infinite loop due to incomplete zstd-compressed data
MAINTAINERS: erofs: add myself as reviewer
This commit is contained in:
commit
2ccec59446
|
|
@ -9209,6 +9209,7 @@ R: Yue Hu <zbestahu@gmail.com>
|
|||
R: Jeffle Xu <jefflexu@linux.alibaba.com>
|
||||
R: Sandeep Dhavale <dhavale@google.com>
|
||||
R: Hongbo Li <lihongbo22@huawei.com>
|
||||
R: Chunhai Guo <guochunhai@vivo.com>
|
||||
L: linux-erofs@lists.ozlabs.org
|
||||
S: Maintained
|
||||
W: https://erofs.docs.kernel.org
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ static int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq,
|
|||
dctx.bounce = strm->bounce;
|
||||
|
||||
do {
|
||||
dctx.avail_out = out_buf.size - out_buf.pos;
|
||||
dctx.inbuf_sz = in_buf.size;
|
||||
dctx.inbuf_pos = in_buf.pos;
|
||||
err = z_erofs_stream_switch_bufs(&dctx, &out_buf.dst,
|
||||
|
|
@ -188,14 +187,18 @@ static int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq,
|
|||
in_buf.pos = dctx.inbuf_pos;
|
||||
|
||||
zerr = zstd_decompress_stream(stream, &out_buf, &in_buf);
|
||||
if (zstd_is_error(zerr) || (!zerr && rq->outputsize)) {
|
||||
dctx.avail_out = out_buf.size - out_buf.pos;
|
||||
if (zstd_is_error(zerr) ||
|
||||
((rq->outputsize + dctx.avail_out) && (!zerr || (zerr > 0 &&
|
||||
!(rq->inputsize + in_buf.size - in_buf.pos))))) {
|
||||
erofs_err(sb, "failed to decompress in[%u] out[%u]: %s",
|
||||
rq->inputsize, rq->outputsize,
|
||||
zerr ? zstd_get_error_name(zerr) : "unexpected end of stream");
|
||||
zstd_is_error(zerr) ? zstd_get_error_name(zerr) :
|
||||
"unexpected end of stream");
|
||||
err = -EFSCORRUPTED;
|
||||
break;
|
||||
}
|
||||
} while (rq->outputsize || out_buf.pos < out_buf.size);
|
||||
} while (rq->outputsize + dctx.avail_out);
|
||||
|
||||
if (dctx.kout)
|
||||
kunmap_local(dctx.kout);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user