Visitar URL original
[CATENACYBER]: [CPP] CWE-476 Null Pointer Dereference : Another query to either missing or redundant NULL check · Issue #148 · github/securitylab · GitHub
The Wayback Machine - https://web.archive.org/web/20200908014710/https://github.com/github/securitylab/issues/148
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

[CATENACYBER]: [CPP] CWE-476 Null Pointer Dereference : Another query to either missing or redundant NULL check #148

Closed
catenacyber opened this issue Jul 8, 2020 · 8 comments
Labels

Comments

@catenacyber
Copy link

@catenacyber catenacyber commented Jul 8, 2020

CVE ID(s)

List the CVE ID(s) associated with this vulnerability. GitHub will automatically link CVE IDs to the GitHub Advisory Database.

Report

A potential NULL dereference (or redundant NULL check) may happen if a parameter is checked once against NULL in a function but not every time before it gets used.

This improvement to RedundantNullCheckSimple, in addition to finding the NULL dereference from CVE-2020-10957 also finds the redundant null checks from :

Pull Request is here :
github/codeql#3921

  • Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc). We would love to have you spread the word about the good work you are doing

Result(s)

Provide at least one useful result found by your query, on some revision of a real project.

One is in the following code

if (errormsg != NULL || auth_args[0] == NULL) {
        if (auth_args != NULL) {
            i_error("login client: Username missing from auth reply");

where auth_args gets dereferenced before checking its NULLness

And the other is here with the dereference in some path
https://github.com/dovecot/core/blob/81b5b188c478ec36bea8bda8fcad1e5f32ac612b/src/plugins/mail-crypt/mail-crypt-global-key.c#L91
And the check against NULL in another path
https://github.com/dovecot/core/blob/81b5b188c478ec36bea8bda8fcad1e5f32ac612b/src/plugins/mail-crypt/mail-crypt-global-key.c#L105

@catenacyber
Copy link
Author

@catenacyber catenacyber commented Jul 8, 2020

This follows #110

@catenacyber
Copy link
Author

@catenacyber catenacyber commented Aug 27, 2020

github/codeql#3921 got merged. What is next ?

@ghsecuritylab
Copy link
Collaborator

@ghsecuritylab ghsecuritylab commented Aug 27, 2020

Your submission is now in status SecLab review.

For information, the evaluation workflow is the following:
CodeQL initial assessment > SecLab review > CodeQL review > SecLab finalize > Pay > Closed

@ghsecuritylab
Copy link
Collaborator

@ghsecuritylab ghsecuritylab commented Sep 2, 2020

Your submission is now in status SecLab finalize.

For information, the evaluation workflow is the following:
CodeQL initial assessment > SecLab review > CodeQL review > SecLab finalize > Pay > Closed

@xcorail
Copy link
Contributor

@xcorail xcorail commented Sep 3, 2020

Hey @catenacyber can you please send me privately your email? Thanks

@ghsecuritylab
Copy link
Collaborator

@ghsecuritylab ghsecuritylab commented Sep 3, 2020

Your submission is now in status Pay.

For information, the evaluation workflow is the following:
CodeQL initial assessment > SecLab review > CodeQL review > SecLab finalize > Pay > Closed

@xcorail
Copy link
Contributor

@xcorail xcorail commented Sep 3, 2020

Created Hackerone report 974370 for bounty 243565 : [148] [CATENACYBER]: [CPP] CWE-476 Null Pointer Dereference : Another query to either missing or redundant NULL check 🎉

@xcorail xcorail closed this Sep 3, 2020
@ghsecuritylab
Copy link
Collaborator

@ghsecuritylab ghsecuritylab commented Sep 3, 2020

Your submission is now in status Closed.

For information, the evaluation workflow is the following:
CodeQL initial assessment > SecLab review > CodeQL review > SecLab finalize > Pay > Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
@xcorail @catenacyber @ghsecuritylab and others
You can’t perform that action at this time.