kernel-aes67/security/tomoyo
Tetsuo Handa 2f03fc340c tomoyo: fix UAF write bug in tomoyo_write_control()
Since tomoyo_write_control() updates head->write_buf when write()
of long lines is requested, we need to fetch head->write_buf after
head->io_sem is held.  Otherwise, concurrent write() requests can
cause use-after-free-write and double-free problems.

Reported-by: Sam Sun <samsun1006219@gmail.com>
Closes: https://lkml.kernel.org/r/CAEkJfYNDspuGxYx5kym8Lvp--D36CMDUErg4rxfWFJuPbbji8g@mail.gmail.com
Fixes: bd03a3e4c9 ("TOMOYO: Add policy namespace support.")
Cc:  <stable@vger.kernel.org> # Linux 3.1+
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-03-01 11:14:00 -08:00
..
policy
.gitignore
Kconfig tomoyo: Update website link 2023-01-13 23:11:38 +09:00
Makefile
audit.c tomoyo: replace tomoyo_round2() with kmalloc_size_roundup() 2023-03-01 23:46:12 +09:00
common.c tomoyo: fix UAF write bug in tomoyo_write_control() 2024-03-01 11:14:00 -08:00
common.h tomoyo: remove unused function declaration 2023-08-13 22:07:15 +09:00
condition.c
domain.c tomoyo: refactor deprecated strncpy 2023-08-05 19:55:10 +09:00
environ.c
file.c
gc.c
group.c
load_policy.c
memory.c
mount.c
network.c
realpath.c
securityfs_if.c
tomoyo.c exec: Check __FMODE_EXEC instead of in_execve for LSMs 2024-01-24 11:38:58 -08:00
util.c