** Description changed:
== SRU Justification ==
Currently, when writing
echo 18446744073709551616 > /proc/sys/fs/file-max
- /proc/sys/fs/file-max will overflow and be set to 0.
+ /proc/sys/fs/file-max will overflow and be set to 0 and crashed the
+ system.
- The upper and lower limit need to be defined properly to avoid this
- issue.
+ The upper and lower limit need to be defined properly to avoid this.
This failure was reported by the case 2 and 3 of the sysctl02 test in LTP:
sysctl02 2 TFAIL: /proc/sys/fs/file-max overflows and set to
18446744073709551615
sysctl02 3 TFAIL: /proc/sys/fs/file-max overflows and set to
9223372036854775808
== 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 ==
- This issue can be verified with the sysctl02 test in LTP.
+ Test kernel could be found here:
+ https://people.canonical.com/~phlin/kernel/lp-1834310-file-max/
+
+ Tested OK on KVM nodes with the following command (extracted from the
+ sysctl02 test case in LTP):
+ $ cat /proc/sys/fs/file-max
+ $ sudo sysctl -w -q fs.file-max=18446744073709551615
+ $ cat /proc/sys/fs/file-max
+ $ sudo sysctl -w -q fs.file-max=9223372036854775808
+ $ cat /proc/sys/fs/file-max
+
+ All three file-max output should be identical with the patched kernel.
+
+ This is because the file-max value is parsed via
+ __do_proc_doulongvec_minmax(), which does not report error when min or
+ 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 kernel for a while.
+ And it's been applied in some of our kernels for a while.
+
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-52-generic 4.15.0-52.56
ProcVersionSignature: User Name 4.15.0-52.56-generic 4.15.18
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=/boot/vmlinuz-4.15.0-52-generic
root=UUID=6f08d1c2-d443-47ee-97ca-2aeb1bf53f35 ro
RelatedPackageVersions:
linux-restricted-modules-4.15.0-52-generic N/A
linux-backports-modules-4.15.0-52-generic N/A
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-1.8.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-xenial
dmi.modalias:
dmi:bvnSeaBIOS:bvrUbuntu-1.8.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-xenial:cvnQEMU:ct1:cvrpc-i440fx-xenial:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-xenial
dmi.sys.vendor: QEMU
** Changed in: linux (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1834310
Title:
Handle overflow for file-max
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1834310/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs