]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: reject gigantic reads/write to sysctl files
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Jun 2020 17:08:19 +0000 (19:08 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 10 Jun 2020 18:11:33 +0000 (14:11 -0400)
commitfd8c59349a1ef6daefefecf77d9af482b8ae0f71
treeb8c9350abed0e245cbda54b026158f78a977cbe0
parent29d79070c7ecc7c3c81a518afa65c0ea8c0cb738
sysctl: reject gigantic reads/write to sysctl files

Instead of triggering a WARN_ON deep down in the page allocator just
give up early on allocations that are way larger than the usual sysctl
values.

Fixes: ecad013df758 ("sysctl: pass kernel pointers to ->proc_handler")
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/proc/proc_sysctl.c