mirror of
				https://gitlab.com/qemu-project/edk2.git
				synced 2025-10-30 07:56:39 +08:00 
			
		
		
		
	EmbeddedPkg: Clear keyboard queue buffer after reading
There is a possibility to retrieve user input keystroke data stored in the queue buffer via the EFI_SIMPLE_TEXT_INPUT_PROTOCOL pointer. To prevent exposure of the password string, clear the queue buffer by filling it with zeros after reading. Signed-off-by: Nick Wang <nick.wang@insyde.com>
This commit is contained in:
		| @ -348,6 +348,7 @@ Dequeue ( | ||||
|   } | ||||
|  | ||||
|   CopyMem (KeyData, &Queue->Buffer[Queue->Front], sizeof (EFI_KEY_DATA)); | ||||
|   ZeroMem (&Queue->Buffer[Queue->Front], sizeof (EFI_KEY_DATA)); | ||||
|   Queue->Front = (Queue->Front + 1) % QUEUE_MAX_COUNT; | ||||
|  | ||||
|   return EFI_SUCCESS; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 nick.wang
					nick.wang