Handle overflow for file-max
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Bionic |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Cosmic |
Won't Fix
|
Undecided
|
Po-Hsu Lin |
Bug Description
== SRU Justification ==
Currently, when writing 2^64-1 or 2^63 into file-max:
echo 184467440737095
Will make the system stuck with "Too many open files in system" error within seconds.
The upper and lower limit need to be defined properly to avoid this.
(The case for passing 2^64 will be addressed in bug 1833935)
This failure was reported by the case 2 and 3 of the sysctl02 test in LTP:
sysctl02 2 TFAIL: /proc/sys/
sysctl02 3 TFAIL: /proc/sys/
== Fix ==
* 32a5ad9c sysctl: handle overflow for file-max
* 9002b214 kernel/sysctl.c: fix out-of-bounds access when setting file-max
These patches can be cherry-picked into B/C.
They have already been applied in X/D from stable update process.
== Test ==
Test kernel could be found here:
https:/
Tested OK on KVM nodes with the following command (extracted from the
sysctl02 test case in LTP):
$ cat /proc/sys/
$ sudo sysctl -w -q fs.file-
$ cat /proc/sys/
$ sudo sysctl -w -q fs.file-
$ cat /proc/sys/
All three file-max output should be identical with the patched kernel.
This is because the file-max value is parsed via
__do_proc_
max are exceeded but it will just keep the old value instead.
== Regression Potential ==
Low, just adding boundaries to the file-max.
And it's been applied in some of our kernels for a while.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.15.0-52-generic x86_64
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Jun 25 11:03 seq
crw-rw---- 1 root audio 116, 33 Jun 25 11:03 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
Date: Tue Jun 25 11:04:55 2019
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
PciMultimedia:
ProcFB: 0 cirrusdrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.173.6
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: Ubuntu-
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.
dmi.modalias: dmi:bvnSeaBIOS:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.
dmi.sys.vendor: QEMU
CVE References
Changed in linux (Ubuntu): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
description: | updated |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in linux (Ubuntu Cosmic): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in linux (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in linux (Ubuntu Cosmic): | |
status: | Confirmed → In Progress |
tags: | added: cosmic |
description: | updated |
description: | updated |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Cosmic): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Cosmic): | |
status: | Fix Committed → Won't Fix |
This change was made by a bot.