diff options
| author | Vratislav Bendel <[email protected]> | 2022-02-02 11:25:11 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2022-02-02 16:02:10 +0000 |
| commit | 186edf7e368c40d06cf727a1ad14698ea67b74ad (patch) | |
| tree | 138762ec92ee3a0a054d3809e235a90db82259d7 /drivers/gpu/drm/lima/lima_gem.c | |
| parent | Linux 5.17-rc1 (diff) | |
| download | kernel-186edf7e368c40d06cf727a1ad14698ea67b74ad.tar.gz kernel-186edf7e368c40d06cf727a1ad14698ea67b74ad.zip | |
selinux: fix double free of cond_list on error paths
On error path from cond_read_list() and duplicate_policydb_cond_list()
the cond_list_destroy() gets called a second time in caller functions,
resulting in NULL pointer deref. Fix this by resetting the
cond_list_len to 0 in cond_list_destroy(), making subsequent calls a
noop.
Also consistently reset the cond_list pointer to NULL after freeing.
Cc: [email protected]
Signed-off-by: Vratislav Bendel <[email protected]>
[PM: fix line lengths in the description]
Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/lima/lima_gem.c')
0 files changed, 0 insertions, 0 deletions
