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

One NPE in dubbo/container/Main.java #8195

Closed
containerAnalyzer opened this issue Jul 1, 2021 · 6 comments
Closed

One NPE in dubbo/container/Main.java #8195

containerAnalyzer opened this issue Jul 1, 2021 · 6 comments
Labels
help wanted Everything needs help from contributors type/bug Bugs to being fixed

Comments

@containerAnalyzer
Copy link

Hello,
Our static analyzer found a following potential NPE. We have checked the feasibility of this execution trace. It is necessary to defend this vulnerability to improve the code quality.

  1. Return null to caller (Trace staring point)

  2. Function getDefaultExtension executes, stores the return value to defaultextension (defaultextension can be null) and return defaultextension to caller, which can be null

  3. Return the return value of function getExtension to caller

  4. Function getExtension executes and stores the return value to extension (extension can be null)

  5. Function add executes and containers contains null as its elements.

  6. Function next executes and return null value

  7. The return value of function next is passed as the this pointer to function start (the return value of function next can be null), which will leak to null pointer dereference

Commit: f26ba91

ContainerAnalyzer

@howie-xu
Copy link
Contributor

howie-xu commented Jul 2, 2021

I will fix it.

howie-xu added a commit to howie-xu/dubbo that referenced this issue Jul 2, 2021
@colin-ife-snyk
Copy link

Any update on this? Has it been fixed yet?

@CrazyHZM CrazyHZM added help wanted Everything needs help from contributors level/easy type/bug Bugs to being fixed labels Sep 24, 2021
@wangchengming666
Copy link
Member

I will fix it.

@howie-xu
Copy link
Contributor

It has already been fixed by #8215

@wangchengming666
Copy link
Member

It has already been fixed by #8215

ok

@wangchengming666
Copy link
Member

@containerAnalyzer pls close issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Everything needs help from contributors type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

5 participants