Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: Fix uninitialized variable usage in zio_do_crypt_data() #13944

Merged
merged 1 commit into from
Sep 26, 2022

Commits on Sep 23, 2022

  1. Linux: Fix uninitialized variable usage in zio_do_crypt_data()

    Coverity complained about this. An error from `hkdf_sha512()` before uio
    initialization will cause pointers to uninitialized memory to be passed
    to `zio_crypt_destroy_uio()`. This is a regression that was introduced
    by cf63739. Interestingly, this never
    affected FreeBSD, since the FreeBSD version never had that patch ported.
    Since moving uio initialization to the top of this function would slow
    down the qat_crypt() path, we only move the `memset()` calls to the top
    of the function. This is sufficient to fix this problem.
    
    Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
    ryao committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    2da1450 View commit details
    Browse the repository at this point in the history