diff options
author | Roberto Sassu <[email protected]> | 2020-06-05 08:50:28 +0200 |
---|---|---|
committer | Mimi Zohar <[email protected]> | 2020-06-05 06:04:11 -0400 |
commit | 42413b49804b250ced70dac8815388af2d4ad872 (patch) | |
tree | 3601d25bbbea1399bc3207955e9340bd49fd09fd /scripts/gdb/linux/modules.py | |
parent | 6cc7c266e5b47d3cd2b5bb7fd3aac4e6bb2dd1d2 (diff) |
ima: Directly free *entry in ima_alloc_init_template() if digests is NULL
To support multiple template digests, the static array entry->digest has
been replaced with a dynamically allocated array in commit aa724fe18a8a
("ima: Switch to dynamically allocated buffer for template digests"). The
array is allocated in ima_alloc_init_template() and if the returned pointer
is NULL, ima_free_template_entry() is called.
However, (*entry)->template_desc is not yet initialized while it is used by
ima_free_template_entry(). This patch fixes the issue by directly freeing
*entry without calling ima_free_template_entry().
Fixes: aa724fe18a8a ("ima: Switch to dynamically allocated buffer for template digests")
Reported-by: [email protected]
Signed-off-by: Roberto Sassu <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions