Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KEYS: DH: don't feed uninitialized "otherinfo" into KDF
If userspace called KEYCTL_DH_COMPUTE with kdf_params containing NULL otherinfo but nonzero otherinfolen, the kernel would allocate a buffer for the otherinfo, then feed it into the KDF without initializing it. Fix this by always doing the copy from userspace (which will fail with EFAULT in this scenario). Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: David Howells <[email protected]> Acked-by: Stephan Mueller <[email protected]> Signed-off-by: James Morris <[email protected]>
- Loading branch information