Skip to content

Conversation

@awilfox
Copy link
Contributor

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

This is already covered by multiple cctests as noted in the above issue, so I wasn't sure if an explicit test was needed. If so, I can add one.

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels 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
@awilfoxawilfoxforce-pushed the awilfox/fix/issue45901 branch from 8214cc1 to c218f7aCompareDecember 18, 2022 04:27
@addaleaxaddaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 18, 2022
@addaleaxaddaleax changed the title env: check size of args before using for exec_pathsrc: check size of args before using for exec_pathDec 18, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 18, 2022
@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 20, 2022
@nodejs-github-bot
Copy link
Collaborator

@addaleaxaddaleax added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 20, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 20, 2022
@nodejs-github-botnodejs-github-bot merged commit 95200ba into nodejs:mainDec 20, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 95200ba

targos pushed a commit that referenced this pull request 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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@RafaelGSSRafaelGSS mentioned this pull request Jan 2, 2023
RafaelGSS pushed a commit that referenced this pull request 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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
RafaelGSS pushed a commit that referenced this pull request 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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
juanarbol pushed a commit that referenced this pull request 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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@juanarboljuanarbol mentioned this pull request Jan 28, 2023
juanarbol pushed a commit that referenced this pull request 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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EnvironmentTest crashes when /proc is unavailable

5 participants

@awilfox@nodejs-github-bot@jasnell@addaleax@cjihrig