Commit 688d97e
committed
Add NULL check in ns_lookup_list_search for DNS resolution
When no DNS allowlist is configured via --allow-resolve,
wasi_ctx->ns_lookup_list is NULL. This NULL pointer gets passed
to ns_lookup_list_search which dereferences it unconditionally
at the while (*list) loop, causing a crash. A guest WASM module
can trigger this by calling sock_addr_resolve.1 parent c46b10d commit 688d97e
1 file changed
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
0 commit comments