diff options
author | Alan Somers <asomers@gmail.com> | 2022-09-15 14:58:56 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2022-11-28 23:07:54 -0700 |
commit | 8e91b28b64bdd18fc6fa61af8e89947ad7fb97bf (patch) | |
tree | 335f72ffe2636d3783cdfba3214ea33458e6e11e /test/sys/test_signal.rs | |
parent | 12fb35434f04dccf941c3e1e52fb98df6cea41e6 (diff) | |
download | nix-8e91b28b64bdd18fc6fa61af8e89947ad7fb97bf.zip |
Fix UB in the SO_TYPE sockopt
When reading a value into an enum from getsockopt, we must validate it.
Failing to do so can lead to UB for example with SOCK_PACKET on Linux.
Perform the validation in GetSockOpt::get. Currently SockType is the
only type that requires validation.
Fixes #1819
Diffstat (limited to 'test/sys/test_signal.rs')
0 files changed, 0 insertions, 0 deletions