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

Null pointer dereference in nv-pci.c #57

Closed
qarmin opened this issue May 12, 2022 · 4 comments
Closed

Null pointer dereference in nv-pci.c #57

qarmin opened this issue May 12, 2022 · 4 comments
Labels
bug Something isn't working Implemented Fixed, in test prior to release integration NV-Triaged An NVBug has been created for dev to investigate
Milestone

Comments

@qarmin
Copy link

qarmin commented May 12, 2022

NVIDIA Driver Version
Git

if (!nvl)
{
/* The device was not found, which should not happen */
nv_printf(NV_DBG_ERRORS,
"NVRM: Failed removal of minor device %u!\n",
nvl->minor_num);
WARN_ON(1);
goto done;
}

nvl->minor_num is used if nvl is null

@qarmin qarmin changed the title Null pointer dereference in Null pointer dereference in nv-pci.c May 12, 2022
misyltoad added a commit to misyltoad/open-gpu-kernel-modules that referenced this issue May 12, 2022
misyltoad added a commit to misyltoad/open-gpu-kernel-modules that referenced this issue May 12, 2022
@amrit1711
Copy link
Collaborator

Thanks qarmin for highlighting the bug, I have filed a bug 3643046 internally for tracking purpose.

@shbaskaran shbaskaran added the bug Something isn't working label May 12, 2022
@sickcodes
Copy link

May as well track it externally 🎉 nice find

@PAR2020 PAR2020 added the NV-Triaged An NVBug has been created for dev to investigate label May 17, 2022
@PAR2020
Copy link
Contributor

PAR2020 commented Jul 8, 2022

Resolved in PR #61

@PAR2020 PAR2020 added the Implemented Fixed, in test prior to release integration label Jul 8, 2022
@aritger aritger closed this as completed in 28d2504 Aug 2, 2022
@PAR2020 PAR2020 added this to the 515.65.01 milestone Aug 2, 2022
Daasin added a commit to Daasin/OPU-Kernel-Modules that referenced this issue Nov 23, 2022
* moved array sanity check to before the array access

* Fixed some typos

* [~] Fix typos in NVDEC Engine Descriptor

* Fixed capitalization

* Create CONTRIBUTING.md

* use github forms for issue flow management, fixes NVIDIA#127

* issue template: add automatic tags

* Update HTTP link to HTTPS

http://www.nvidia.com redirects to https://www.nvidia.com/, so linking to http is reduntant.
More importantly, it could be considered a security issue, do to the nature of plain http. An attacker could perform a MITM attack and redirect the HTTP request to a malicious website.
```
> GET / HTTP/1.1
> Host: www.nvidia.com

Response:
< HTTP/1.1 307 Temporary Redirect
< Location: https://www.nvidia.com/
```

* Fix shellcheck errors in conftest

* Remove non-posix local usage from conftest

* Remove trailing whitespace from conftest

* 515.48.07

* 515.57

* update CONTRIBUTING.md to explain cosmetics policy

Also adds a blurb about the missing code style guide.

* nv-pci: Fix nullptr dereference if device was not found

Closes NVIDIA#57

* dp_configcaps: Avoid querying bus if both bLinkActive and bLinkReady is NULL

Doesn't fix a crash -- but avoids redundant work due to a copy paste error.

Closes NVIDIA#56

* osapi: Fix dereferencing NULL pNumaMemSize in rm_get_gpu_numa_info

Copy paste error.

Closes: NVIDIA#55

* dp_connectorimpl: Remove duplicate dscBitsPerPixelIncrement

All other values of the BITS_PER_PIXEL_INCREMENT are handled here.

This one was previously using a bitwise OR in, then also assigning directly after.

Closes: NVIDIA#54

* dp_connectorimpl: Use switch-case for dscBitsPerPixelIncrement

This is an enum, so we can just use a switch case instead of chaning IFs constantly.

* 515.65.01

* 515.76

* 520.61.05

* 520.56.06

* 525.53

Co-authored-by: astolfo <[email protected]>
Co-authored-by: Maneet Singh <[email protected]>
Co-authored-by: Filip Fedoryszyn <[email protected]>
Co-authored-by: TrickyDmitriy <[email protected]>
Co-authored-by: keroeslux <[email protected]>
Co-authored-by: Andy Ritger <[email protected]>
Co-authored-by: Bernhard Stoeckner <[email protected]>
Co-authored-by: Alcaparra <[email protected]>
Co-authored-by: nitepone <[email protected]>
Co-authored-by: Joshua Ashton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Implemented Fixed, in test prior to release integration NV-Triaged An NVBug has been created for dev to investigate
Projects
None yet
Development

No branches or pull requests

6 participants
@qarmin @amrit1711 @PAR2020 @sickcodes @shbaskaran and others