Page MenuHomeFreeBSD

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

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

Details

Summary

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

Reported by: pho

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

Diff Detail

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