Skip to content
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

Reliance on Untrusted Inputs in a Security Decision #209

Closed
RootUp opened this issue Jul 16, 2018 · 2 comments
Closed

Reliance on Untrusted Inputs in a Security Decision #209

RootUp opened this issue Jul 16, 2018 · 2 comments
Assignees

Comments

@RootUp
Copy link

RootUp commented Jul 16, 2018

File: /src/nbla/logger.cpp

const char *homedir = getenv("HOME");
    if (homedir == nullptr) {
      struct passwd *pw = getpwuid(getuid());
      if (pw != nullptr) {
        homedir = pw->pw_dir;
}

If an attacker can set environment variables which are untrustable variables so they can have any content and length, and the same variable can be set more than once such as which will lead to attack such as (CWE-807, CWE-20).

PS: This issue was identified while code review, no PoC or exploit was created.

@YukioOobuchi YukioOobuchi self-assigned this Jul 17, 2018
@RootUp
Copy link
Author

RootUp commented Aug 7, 2018

Hey @TE-YukioOobuchi
Any update on this, request you to please let me know.

@YukioOobuchi
Copy link
Contributor

I am sorry for leaving it for a long time.

It has been fixed at e873476.

We simply do not get HOME from environment variables.

Thank you for pointing out this problem.

@RootUp RootUp closed this as completed Apr 4, 2019
TE-MasatoAIshii pushed a commit that referenced this issue Nov 24, 2021
Data Cleansing with Storage-efficient Approximation of Influence Functions
TE-StephenTiedemann pushed a commit that referenced this issue Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants