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

Potential null pointer dereference on pointer Token (Bugzilla Bug 2286) #8221

Closed
tianocore-issues opened this issue Oct 18, 2019 · 6 comments
Labels
package:mdemodulepkg priority:medium Moderate impact. Should be prioritized over lower priority issues. type:bug Something isn't working

Comments

@tianocore-issues
Copy link

This issue was created automatically with bugzilla2github

Bugzilla Bug 2286

Date: 2019-10-18T05:19:44+00:00
From: Colin Ian King <<colin.king>>
To: newexplorerj
CC: guomin.jiang, nobody

Last updated: 2020-03-26T21:58:58+00:00

@tianocore-issues
Copy link
Author

Comment 10098

Date: 2019-10-18 05:19:44 +0000
From: Colin Ian King <<colin.king>>

  • Industry Specification: ---
  • Target OS: ---
  • Bugzilla Assignee(s): newexplorerj

In source MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c, function SdEraseBlocks there is a potential null pointer dereference on pointer Token:

The following code checks if Token is potentially null, implying that it could possibly be null:

1349 if ((Token != NULL) && (Token->Event != NULL)) {
1350 Token->TransactionStatus = EFI_SUCCESS;
1351 }

and later, the potentially null Token pointer is being dereferenced:

1370 DEBUG ((EFI_D_ERROR, "SdEraseBlocks(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", Lba, BlockNum, Token->Event, Status));

Either Token can never be NULL and the sanity check on line 1349 is not required, or Token can potentially be NULL in which case a null pointer dereference occurs when accessing Token->Event.

@tianocore-issues
Copy link
Author

Comment 10274

Date: 2019-11-01 02:57:43 +0000
From: nobody <>

Shenglei: please check it.

@tianocore-issues
Copy link
Author

Comment 11325

Date: 2020-02-19 22:23:03 +0000
From: shenglei.zhang

Liming will take it.

@tianocore-issues
Copy link
Author

Comment 11336

Date: 2020-02-20 09:35:27 +0000
From: nobody <>

Guomin will check it.

@tianocore-issues
Copy link
Author

Comment 11523

Date: 2020-03-04 04:57:29 +0000
From: newexplorerj

Have comment at https://edk2.groups.io/g/devel/message/55377, waiting for reviewing.

@tianocore-issues
Copy link
Author

Comment 11868

Date: 2020-03-26 21:58:58 +0000
From: guomin.jiang

Fixed in 695d90b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:mdemodulepkg priority:medium Moderate impact. Should be prioritized over lower priority issues. type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant