An error occurred while fetching folder content.
time/namespace: Add max_time_namespaces ucount
Dmitry Safonov authored
commit eeec26d5 upstream.

Michael noticed that userns limit for number of time namespaces is missing.

Furthermore, time namespace introduced UCOUNT_TIME_NAMESPACES, but didn't
introduce an array member in user_table[]. It would make array's
initialisation OOB write, but by luck the user_table array has an excessive
empty member (all accesses to the array are limited with UCOUNT_COUNTS - so
it silently reuses the last free member.

Fixes user-visible regression: max_inotify_instances by reason of the
missing UCOUNT_ENTRY() has limited max number of namespaces instead of the
number of inotify instances.

Fixes: 769071ac

 ("ns: Introduce Time Namespace")
Reported-by: default avatarMichael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarAndrei Vagin <avagin@gmail.com>
Acked-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Cc: stable@k...
b8ba5056
Name Last commit Last update
..
ABI Merge tag 'for-linus-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
EDID docs: driver-api: add a series of orphaned documents
PCI Documentation: PCI: Fix pci_alloc_irq_vectors() function name typo
RCU Merge branches 'doc.2019.12.10a', 'exp.2019.12.09a', 'fixes.2020.01.24a', 'kfree_rcu.2020.01.24a', 'list.2020.01.10a', 'preempt.2020.01.24a' and 'torture.2019.12.09a' into HEAD
accounting docs: add some documentation dirs to the driver-api book
admin-guide time/namespace: Add max_time_namespaces ucount
arm ARM: at91: Documentation: add sam9x60 product and datasheet
arm64 Merge tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
block docs: block/biovecs: update the location of bio.c
bpf bpf: Add s390 testing documentation
cdrom docs: add some directories to the main documentation index
core-api mm, tree-wide: rename put_user_page*() to unpin_user_page*()
cpu-freq Documentation: cpufreq: Update policy notifier documentation
crypto crypto: algapi - make unregistration functions return void
dev-tools Documentation: kunit: fixed sphinx error in code block
devicetree Merge tag 'arm-soc-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
doc-guide Documentation: build warnings related to missing blank lines after explicit markups has been fixed
driver-api Merge tag 'dmaengine-fix-5.6' of git://git.infradead.org/users/vkoul/slave-dma
fault-injection docs: add some directories to the main documentation index
fb fbdev: fbmem: allow overriding the number of bootup logos
features Merge tag 's390-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
filesystems Merge tag 'zonefs-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs
firmware-guide docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan()
firmware_class firmware: revamp firmware documentation
fpga Documentation: fpga: dfl: add descriptions for thermal/power management interfaces
gpu
hid
hwmon
i2c
ia64
ide
iio
infiniband
input
isdn
kbuild
kernel-hacking
leds
livepatch
locking
m68k
maintainer
media
mic
mips
misc-devices
netlabel
networking
nios2
nvdimm
openrisc
parisc
pcmcia
power
powerpc
process
riscv
s390
scheduler
scsi
security
sh
sound
sparc
sphinx-static
sphinx
spi
target
timers
trace
translations
usb
userspace-api
virt
vm
w1
watchdog
x86
xtensa
.gitignore
COPYING-logo
Changes
CodingStyle
DMA-API-HOWTO.txt
DMA-API.txt
DMA-ISA-LPC.txt
DMA-attributes.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
Kconfig
Makefile
SubmittingPatches
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
bus-virt-phys-mapping.txt
conf.py
crc32.txt