CyberRota Analysis
AI-GeneratedThe vulnerability affects the Linux kernel's Tegra cryptographic module, specifically in the `tegra_gcm_do_one_req()` function, where an incorrect calculation of `rctx->cryptlen` can lead to a crash if the `tegra_gcm_setauthsize()` function is not called, resulting in a potential buffer overflow. This issue poses a risk of system instability and could be exploited during decryption operations, impacting systems relying on Tegra hardware for cryptographic functions. Organizations using Linux on Tegra devices should prioritize addressing this vulnerability to ensure system reliability and security.
Original NVD Description
In the Linux kernel, the following vulnerability has been resolved: crypto: tegra - fix rctx->cryptlen calculation in tegra_gcm_do_one_req() Perform rctx->cryptlen calculation in tegra_gcm_do_one_req() the same way it is done in tegra_ccm_crypt_init(). The current formulae may lead to a crash if a caller does not call tegra_gcm_setauthsize() and so ctx->authsize remains zero. Then a decrypt operation with incorrect rctx->cryptlen will lead to a write beyound rctx->dst_sg buffer. As a follow-up cleanup delete struct tegra_aead_ctx->authsize field since it appears to be completely unused. Also simplify tegra_ccm_setauthsize() and tegra_gcm_setauthsize() functions respectively.