# RUSTSEC-2026-0001: Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-01-05T12:00:00.000Z
- Modified: 2026-01-06T15:50:23.269Z

## Description

The `SharedPointer::alloc` implementation for `sync::Arc<T>` and `rc::Rc<T>` in `rkyv/src/impls/alloc/rc/atomic.rs` (and `rc.rs`) does not check if the allocator returns a null pointer on OOM (Out of Memory).

This null pointer can flow through to `SharedPointer::from_value`, which calls `Box::from_raw(ptr)` with the null pointer. This triggers undefined behavior when utilizing safe deserialization APIs (such as `rkyv::from_bytes` or `rkyv::deserialize_using`) if an OOM condition occurs during the allocation of the shared pointer.

The issue is reachable through safe code and violates Rust's safety guarantees.

(As written by RustSec Advisory Database.)

## Affected

- rkyv (crates.io): from 0.0.0-0 before 0.7.46; from 0.8.0 before 0.8.13

## References

- <https://crates.io/crates/rkyv> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0001.html> (advisory)
- <https://github.com/rkyv/rkyv/issues/644> (report)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0001](https://rustsec.org/advisories/RUSTSEC-2026-0001.html), CC0-1.0, modified 2026-01-06

---

Page: https://cve.day/RUSTSEC-2026-0001 · Whole record: https://cve.day/RUSTSEC-2026-0001.json · Rebuilt by cve.day 2026-11-25T22:56:43.298Z
