Re: [edk2] [Patch] SecurityPkg OpalPasswordDxe: Fix buffer overflow issue.

2016-08-02 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Dong, Eric Sent: Tuesday, August 2, 2016 7:33 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: [Patch] SecurityPkg OpalPasswordDxe: Fix buffer overflow issue. In current code, PSID is processed as string and the length is 0x20. Curr

[edk2] [Patch] SecurityPkg OpalPasswordDxe: Fix buffer overflow issue.

2016-08-02 Thread Eric Dong
In current code, PSID is processed as string and the length is 0x20. Current code only reserved 0x20 length buffer for it, no extra buffer for the '\0'. When driver call UnicodeStrToAsciiStrS to convert PSID, it search the '\0' for the end. So extra dirty data saved in PSID info which caused PSID r