diff options
| author | Kees Cook <[email protected]> | 2024-12-16 22:45:15 +0000 |
|---|---|---|
| committer | Jan Kara <[email protected]> | 2024-12-18 10:33:40 +0000 |
| commit | b8f2688258f886f0bc0c0cb3ebe51efaa12191ec (patch) | |
| tree | d0865144bb20468023a5a507f5d7c945f1823f7c /security/selinux/hooks.c | |
| parent | Linux 6.13-rc2 (diff) | |
| download | kernel-b8f2688258f886f0bc0c0cb3ebe51efaa12191ec.tar.gz kernel-b8f2688258f886f0bc0c0cb3ebe51efaa12191ec.zip | |
inotify: Use strscpy() for event->name copies
Since we have already allocated "len + 1" space for event->name, make sure
that name->name cannot ever accidentally cause a copy overflow by calling
strscpy() instead of the unbounded strcpy() routine. This assists in
the ongoing efforts to remove the unsafe strcpy() API[1] from the kernel.
Link: https://github.com/KSPP/linux/issues/88 [1]
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions
