diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2023-04-20 17:04:58 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-05-08 16:37:42 -0400 |
commit | 53f3517ae0870fcb398afbba8ff901d0267772b3 (patch) | |
tree | 894f95d339a535f8ad246ddc84d9d9691a2a0231 /io_uring/rw.c | |
parent | 6f933aa7dfd0bb84b7935168f1d45abec4f702c1 (diff) | |
download | linux-53f3517ae0870fcb398afbba8ff901d0267772b3.tar.gz linux-53f3517ae0870fcb398afbba8ff901d0267772b3.tar.bz2 linux-53f3517ae0870fcb398afbba8ff901d0267772b3.zip |
selinux: do not leave dangling pointer behind
In case mls_context_cpy() fails due to OOM set the free'd pointer in
context_cpy() to NULL to avoid it potentially being dereferenced or
free'd again in future. Freeing a NULL pointer is well-defined and a
hard NULL dereference crash is at least not exploitable and should give
a workable stack trace.
Fixes: 12b29f34558b ("selinux: support deferred mapping of contexts")
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'io_uring/rw.c')
0 files changed, 0 insertions, 0 deletions