diff options
| author | Xiu Jianfeng <[email protected]> | 2022-05-27 11:17:26 +0000 |
|---|---|---|
| committer | Mimi Zohar <[email protected]> | 2022-06-15 18:03:47 +0000 |
| commit | 51dd64bb99e4478fc5280171acd8e1b529eadaf7 (patch) | |
| tree | 8f0854f67dd34036d7e6bf4ca9fe5b7e07001c67 /scripts/clang-tools/gen_compile_commands.py | |
| parent | Linux 5.19-rc2 (diff) | |
| download | kernel-51dd64bb99e4478fc5280171acd8e1b529eadaf7.tar.gz kernel-51dd64bb99e4478fc5280171acd8e1b529eadaf7.zip | |
Revert "evm: Fix memleak in init_desc"
This reverts commit ccf11dbaa07b328fa469415c362d33459c140a37.
Commit ccf11dbaa07b ("evm: Fix memleak in init_desc") said there is
memleak in init_desc. That may be incorrect, as we can see, tmp_tfm is
saved in one of the two global variables hmac_tfm or evm_tfm[hash_algo],
then if init_desc is called next time, there is no need to alloc tfm
again, so in the error path of kmalloc desc or crypto_shash_init(desc),
It is not a problem without freeing tmp_tfm.
And also that commit did not reset the global variable to NULL after
freeing tmp_tfm and this makes *tfm a dangling pointer which may cause a
UAF issue.
Reported-by: Guozihua (Scott) <[email protected]>
Signed-off-by: Xiu Jianfeng <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions
