According to
,
fd_fdstat_get would return
fs_flags directly from
fcntl() call on a POSIX host. However, there's no translation logic to generate the fd flags that conform to
https://github.com/WebAssembly/wasi-libc/blob/a05277a6803d99dc5f8d5c250a02cf37ff90882a/libc-bottom-half/headers/public/wasi/api.h#L896, so it's highly likely that an invalid
fs_flags is passed to wasm code.
According to
uvwasi/src/uvwasi.c
Line 885 in 6eeddba
fd_fdstat_getwould returnfs_flagsdirectly fromfcntl()call on a POSIX host. However, there's no translation logic to generate the fd flags that conform to https://github.com/WebAssembly/wasi-libc/blob/a05277a6803d99dc5f8d5c250a02cf37ff90882a/libc-bottom-half/headers/public/wasi/api.h#L896, so it's highly likely that an invalidfs_flagsis passed to wasm code.