Page MenuHomeFreeBSD

random(4): Fix a regression in short AES mode reads

Authored by cem on Jun 18 2019, 6:35 PM.



In r349154, random device reads of size < 16 bytes (AES block size) were
accidentally broken to loop forever. Correct the loop condition for small

Reported by: pho

Test Plan
$ dd if=/dev/random bs=1 count=1 of=/dev/null
(should exit promptly)

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem created this revision.Jun 18 2019, 6:35 PM
cem added a reviewer: secteam.Jun 18 2019, 6:39 PM
cem added subscribers: jkim, cy.Jun 18 2019, 6:42 PM
delphij accepted this revision.Jun 18 2019, 6:47 PM
This revision is now accepted and ready to land.Jun 18 2019, 6:47 PM
This revision was automatically updated to reflect the committed changes.