CVE-2020-35916
MEDIUM5.5EPSS 0.05%Mutable reference with immutable provenance
描述
A mutable reference to a struct was constructed by dereferencing a pointer obtained from `slice::as_ptr`. Instead, `slice::as_mut_ptr` should have been called on the mutable slice argument. The former performs an implicit reborrow as an immutable shared reference which does not allow writing through the derived pointer. There is no evidence for miscompilation, exploitable or otherwise, caused by this bug. [Further investigation on Zulip][Zulip] suggests that the unoptimized generated LLVM IR does not contain any UB itself, effectively mitigating further effects. [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/146229-wg-secure-code/topic/Implications.20of.20using.20.60slice.3A.3Aas_ptr.60.20for.20mutable.20access/near/216499472
受影響套件(3)
- crates.io/imagefrom 0, < 0.23.12
- crates.io/image>= 0.0.0-0, < 0.23.12
- Debian/rust-imagefrom 0, < 0.23.14-1
CVSS 分數
| 來源 | 版本 | 嚴重程度 | 向量 |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
參考連結(8)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2020-35916
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2020-35916
- PATCHhttps://crates.io/crates/image
- PATCHhttps://github.com/image-rs/image
- WEBhttps://github.com/image-rs/image/commit/5cbe1e6767d11aff3f14c7ad69a06b04e8d583c7
- WEBhttps://github.com/image-rs/image/issues/1357
- WEBhttps://github.com/image-rs/image/pull/1358
- WEBhttps://rustsec.org/advisories/RUSTSEC-2020-0073.html