Skip to content

Conversation

@paulidale
Copy link
Contributor

There is a problem in the rand_unix.c code when the random seed fd is greater
than or equal to FD_SETSIZE and the FDSET overruns its limit and walks the
stack.

There is a problem in the rand_unix.c code when the random seed fd is greater
than or equal to FD_SETSIZE and the FDSET overruns its limit and walks the
stack.
@paulidale paulidale added branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) branch: master Applies to master branch labels Aug 24, 2019
levitte pushed a commit that referenced this pull request Aug 24, 2019
There is a problem in the rand_unix.c code when the random seed fd is greater
than or equal to FD_SETSIZE and the FDSET overruns its limit and walks the
stack.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from #9686)
@paulidale
Copy link
Contributor Author

Merged to master and 1.1.1. Thanks.

@paulidale paulidale closed this Aug 24, 2019
levitte pushed a commit that referenced this pull request Aug 24, 2019
There is a problem in the rand_unix.c code when the random seed fd is greater
than or equal to FD_SETSIZE and the FDSET overruns its limit and walks the
stack.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from #9686)

(cherry picked from commit e1f8584)
@paulidale paulidale deleted the select branch August 24, 2019 06:46
arcadia-devtools pushed a commit to catboost/catboost that referenced this pull request Aug 29, 2019
It was deleted in openssl/openssl#9084
It corrupts the stack: openssl/openssl#9686

Note: mandatory check (NEED_CHECK) was skipped
ref:23dc8df65263efcb9cc1e95187a6597a15c60e49
/* Open /dev/random and wait for it to be readable */
if ((fd = open(DEVRANDOM_WAIT, O_RDONLY)) != -1) {
if (DEVRANDM_WAIT_USE_SELECT) {
if (DEVRANDM_WAIT_USE_SELECT && fd < FD_SETSIZE) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just switch to use poll(2)? Do we really support Linux versions that lack poll()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch: master Applies to master branch branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants