-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EnvironmentTest crashes when /proc is unavailable #45901
Comments
We should fix this if possible. Would you like to send a patch? |
awilfox
added a commit
to awilfox/node
that referenced
this issue
Dec 18, 2022
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: nodejs#45901
awilfox
added a commit
to awilfox/node
that referenced
this issue
Dec 18, 2022
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: nodejs#45901
nodejs-github-bot
pushed a commit
that referenced
this issue
Dec 20, 2022
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: #45901 PR-URL: #45902 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this issue
Jan 1, 2023
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: #45901 PR-URL: #45902 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS
pushed a commit
that referenced
this issue
Jan 4, 2023
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: #45901 PR-URL: #45902 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS
pushed a commit
that referenced
this issue
Jan 5, 2023
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: #45901 PR-URL: #45902 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol
pushed a commit
that referenced
this issue
Jan 26, 2023
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: #45901 PR-URL: #45902 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol
pushed a commit
that referenced
this issue
Jan 31, 2023
If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0]. Fixes: #45901 PR-URL: #45902 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
16.15.0, but able to produce with Git head as well
Platform
Linux ember.foxkit.us 5.15.44-mc2-easy #1 SMP Wed Aug 17 20:37:04 UTC 2022 i686 GNU/Linux
Subsystem
env
What steps will reproduce the bug?
/proc/self/exe
does not exist.cctest
/make test-only
on a Linux host.How often does it reproduce? Is there a required condition?
Always reproducible when
/proc
is not mounted (i.e. in a container) or when/proc/self/exe
does not exist.What is the expected behavior?
Test passing.
What do you see instead?
This is because
argv
is accessed innode::GetExecPath
without checking the length first.Additional information
I'm not sure if Node tests are meant to pass without
/proc
mounted on Linux systems, but it seems good to avoid a nullptr dereference when possible.The text was updated successfully, but these errors were encountered: