Skip to content

Bump rand from 0.8.5 to 0.8.7 in /rust - #3

Open
dependabot[bot] wants to merge 1 commit into
release/0.xfrom
dependabot/cargo/rust/rand-0.8.7
Open

dependabot[bot] wants to merge 1 commit into
release/0.xfrom
dependabot/cargo/rust/rand-0.8.7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 17, 2026

Copy link
Copy Markdown

Bumps rand from 0.8.5 to 0.8.7.

Changelog

Sourced from rand's changelog.

[0.8.7] - 2026-07-02

Fixes

  • Fix possible memory safety violation due to deserialization of UniformChar from bad source (#1804)

#1804: rust-random/rand#1804

[0.8.6] - 2026-04-14

This release back-ports a fix from v0.10. See also #1763.

Changes

  • Deprecate feature log (#1772)

#1763: rust-random/rand#1763 #1772: rust-random/rand#1772

  • Drop the experimental simd_support feature.
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.7.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.7/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.8.7)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jul 17, 2026
UlysseCorbeil pushed a commit that referenced this pull request Oct 30, 2026
dump_result loaded a full uint256_t out of result.output_data whenever
output_size was non-zero. Context::copy_result_data allocates that buffer
with std::malloc(*size) for exactly the size the executed bytecode passes
to RETURN, so any RETURN of 1..31 bytes over-read the allocation by up to
31 bytes and hex-printed adjacent heap into the tool's JSON. The same
load silently truncated results longer than 32 bytes to their first word.

Hex-encode exactly output_size bytes instead, which fixes both.

Bytecode returning a single byte 0x2a, run three times before the fix:

    $ printf '602a60005360016000f3' > ret1.hex
    $ mce -r ret1.hex
    {"result": "2a00099925560000000000000000000030306633000000006102000000000000"}
    {"result": "2a46eb64be600000000000000000000030306633000000006102000000000000"}
    {"result": "2a731c3e85600000000000000000000030306633000000006102000000000000"}

Only the leading 2a is the result; the other 31 bytes are adjacent heap
and differ per run. The recurring 30306633 is ASCII "00f3", the tail of
the input file's own hex text. After the fix that input prints
{"result": "2a"} on every run.

The truncation is the same defect from the other side - 64 returned
bytes rendered as one digit before the fix:

    $ printf '60406000f3' > ret64.hex
    $ mce -r ret64.hex
    {"result": "0"}

and now prints all 128 hex digits.

Output format changes for results that are not exactly one word wide: a
32-byte RETURN of 42 renders as 64 zero-padded hex digits rather than
"2a". Nothing consumes this output - the only references to mce outside
its own sources are cmd/vm/mce/CMakeLists.txt and cmd/CMakeLists.txt.

category/vm/compiler/types.hpp is dropped alongside the two integer
headers; it was included only for its uint256_t alias, used solely on
the removed line.

Confirmed under gcc-asan. Before, on the one-byte return:

    ERROR: AddressSanitizer: heap-buffer-overflow
    READ of size 32 at 0x72602abe01f0
      #3 dump_result  cmd/vm/mce/mce.cpp:154
    0x72602abe01f1 is located 0 bytes after 1-byte region
    allocated by:
      #1 Context::copy_result_data  category/vm/runtime/context.cpp:208

After: no overflow on returns of 0, 1, 32 or 64 bytes.

The pre-existing heap-use-after-free at mce_main scope exit - Binary bin
is declared before asmjit::JitRuntime rt, so rt is destroyed first and
bin's shared_ptr<Nativecode> releases into the freed JitAllocator - is
left untouched for a separate change.

Raised as EXEC-063 in the mythos-review audit batch (EXE-150).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants