Skip to content

Conversation

@yamt
Copy link
Contributor

@yamt yamt commented Sep 10, 2025

cf. #4463

the fix for sock_addr_resolve is incomplete.
cf. #4610

Copy link
Contributor

@lum1n0us lum1n0us left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is fine, but I'm uncertain about the intention. While there's a possibility of being out of the sandbox, most pointers target local variables in guest language functions. Anyway, safety comes first, so I'm okay with merging it.

@lum1n0us lum1n0us added the enhancement Check if this issue/PR enhances a feature; scripts will use this info. label Sep 11, 2025
@yamt
Copy link
Contributor Author

yamt commented Sep 12, 2025

While there's a possibility of being out of the sandbox, most pointers target local variables in guest language functions.

i'm not sure what you mean.

@yamt
Copy link
Contributor Author

yamt commented Sep 12, 2025

While there's a possibility of being out of the sandbox, most pointers target local variables in guest language functions.

i'm not sure what you mean.

malicious (or, innocent-but-buggy) guest programs can access host memory past the end of its linear memory.
this PR fixes some of the attack surfaces.

@lum1n0us
Copy link
Contributor

malicious (or, innocent-but-buggy) guest programs can access host memory past the end of its linear memory.

Can't argue with that. 😆

TianlongLiang
TianlongLiang approved these changes Sep 12, 2025
@lum1n0us lum1n0us merged commit 5e779b3 into bytecodealliance:main Sep 14, 2025
453 checks passed
lum1n0us pushed a commit to lum1n0us/wasm-micro-runtime that referenced this pull request Oct 12, 2025
lum1n0us added a commit that referenced this pull request Oct 14, 2025
#4665)

* libc-wasi: add missing pointer validations to socket functions (#4611)
cf. #4463
the fix for sock_addr_resolve is incomplete.
cf. #4610

* Sync from main branch
  - wasi_sock_recv doesn't use src_addr
  - check src_addr before coverting

* CI: use windows-2022 image for now (#4633)

github is currently rolling out windows-2025 image.
for some reasons, the "path_symlink_trailing_slashes" test case in
wasi testsuite fails on windows-2025 image.
someone familar with windows need to investigate what was the
key difference between 2022 and 2025.
until that happens, this commit makes our CI use windows-2022 image.

cf.
#4632
actions/runner-images#12677

---------

Co-authored-by: YAMAMOTO Takashi <[email protected]>
kr-t pushed a commit to project-ocre/wasm-micro-runtime that referenced this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Check if this issue/PR enhances a feature; scripts will use this info.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants