]> git.baikalelectronics.ru Git - kernel.git/commit
autofs: harden ioctl table
authorMatthew Wilcox <willy@infradead.org>
Fri, 16 Oct 2020 03:13:08 +0000 (20:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Oct 2020 18:11:22 +0000 (11:11 -0700)
commit79278806757d56158a84ba68f0f4bf11bfdd522e
tree701c254c643a11e7f2f3dc2b252d4d0902d0cf36
parent6cad54cc00188a3f98e335cf11d25c63a18b0262
autofs: harden ioctl table

The table of ioctl functions should be marked const in order to put them
in read-only memory, and we should use array_index_nospec() to avoid
speculation disclosing the contents of kernel memory to userspace.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Ian Kent <raven@themaw.net>
Link: https://lkml.kernel.org/r/20200818122203.GO17456@casper.infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs/dev-ioctl.c