summaryrefslogtreecommitdiff
path: root/test/sys/test_ioctl.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2022-09-15 14:58:56 -0600
committerAlan Somers <asomers@gmail.com>2022-11-28 23:07:54 -0700
commit8e91b28b64bdd18fc6fa61af8e89947ad7fb97bf (patch)
tree335f72ffe2636d3783cdfba3214ea33458e6e11e /test/sys/test_ioctl.rs
parent12fb35434f04dccf941c3e1e52fb98df6cea41e6 (diff)
downloadnix-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_ioctl.rs')
0 files changed, 0 insertions, 0 deletions