title: tomoyo: fix UAF write bug in tomoyo_write_control()
description: In the Linux kernel, the following vulnerability has been resolved:
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.
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: bd03a3e4c9a9, lessThan: a23ac1788e2c, status: affected, versionType: git
version: bd03a3e4c9a9, lessThan: 7d930a4da179, status: affected, versionType: git
version: bd03a3e4c9a9, lessThan: 3bfe04c1273d, status: affected, versionType: git
version: bd03a3e4c9a9, lessThan: 2caa60507948, status: affected, versionType: git
version: bd03a3e4c9a9, lessThan: 6edefe1b6c29, status: affected, versionType: git
version: bd03a3e4c9a9, lessThan: 2f03fc340cac, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 3.1, status: affected
version: 0, lessThan: 3.1, status: unaffected, versionType: custom
version: 5.10.212, lessThanOrEqual: 5.10.*, status: unaffected, versionType: custom
version: 5.15.151, lessThanOrEqual: 5.15.*, status: unaffected, versionType: custom
version: 6.1.81, lessThanOrEqual: 6.1.*, status: unaffected, versionType: custom
version: 6.6.21, lessThanOrEqual: 6.6.*, status: unaffected, versionType: custom
version: 6.7.9, lessThanOrEqual: 6.7.*, status: unaffected, versionType: custom
version: 6.8, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
