Public bug reported:

This was discovered while investigating tracebacks in the cert suite.
We have a script that parses /proc/modules and returns the information
in a more human-readable format as part of the info gathering we do
during cert testing.

On 4.13 and older kernels, this script was run as a normal user with no
error.  On 4.15, this script dumps a python trace because /proc/modules
now returns a null reference instead of just a blank memory offset.

On 4.13 and older, when you read the file, you get something like this
(root and non-root shown):

bladernr@galactica:~$ sudo cat /proc/modules |grep nls_iso8859
nls_iso8859_1 16384 1 - Live 0xffffffffc06b5000
bladernr@galactica:~$ cat /proc/modules |grep nls_iso8859
nls_iso8859_1 16384 1 - Live 0x0000000000000000

Note that non-root reading returns a memory offset of 0x0 which is
easily parsable.

Now, on 4.15, this has changed:

ubuntu@xwing:~$ sudo cat /proc/modules |grep e1000e
e1000e 249856 0 - Live 0xffffffffc0225000
ptp 20480 2 igb,e1000e, Live 0xffffffffc00a9000
ubuntu@xwing:~$ cat /proc/modules |grep e1000e
e1000e 249856 0 - Live 0x          (null)
ptp 20480 2 igb,e1000e, Live 0x          (null)

Now, however, non-root reading returns a null reference which causes
attempts to parse the offset to fail.

I imagine this is probably by design, and it's a minor bug, but I wanted
to raise it as it could cause issues when running userspace tools that
parse /proc/modules on 4.15.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-12-generic 4.15.0-12.13
ProcVersionSignature: User Name 4.15.0-12.13-generic 4.15.7
Uname: Linux 4.15.0-12-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116,  1 Mar 20 17:24 seq
 crw-rw---- 1 root audio 116, 33 Mar 20 17:24 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.8-0ubuntu10
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 Mar 20 17:59:51 2018
MachineType: LENOVO INVALID
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-12-generic.efi.signed 
root=UUID=9fdf32ba-26ce-4d54-8457-dbd62057c7e9 ro
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-12-generic N/A
 linux-backports-modules-4.15.0-12-generic  N/A
 linux-firmware                             1.173
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/07/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: FBKT97CUS
dmi.board.name: ThinkServer RS140
dmi.board.vendor: LENOVO
dmi.board.version: Not Defined
dmi.chassis.type: 7
dmi.chassis.vendor: LENOVO
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: 
dmi:bvnLENOVO:bvrFBKT97CUS:bd04/07/2017:svnLENOVO:pnINVALID:pvrFFFFFFF:rvnLENOVO:rnThinkServerRS140:rvrNotDefined:cvnLENOVO:ct7:cvrToBeFilledByO.E.M.:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: INVALID
dmi.product.version: FFFFFFF
dmi.sys.vendor: LENOVO

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug bionic uec-images

** Description changed:

  This was discovered while investigating tracebacks in the cert suite.
  We have a script that parses /proc/modules and returns the information
  in a more human-readable format as part of the info gathering we do
  during cert testing.
  
  On 4.13 and older kernels, this script was run as a normal user with no
  error.  On 4.15, this script dumps a python trace because /proc/modules
  now returns a null reference instead of just a blank memory offset.
  
  On 4.13 and older, when you read the file, you get something like this
- (root and non-root shown)
+ (root and non-root shown):
  
  bladernr@galactica:~$ sudo cat /proc/modules |grep nls_iso8859
  nls_iso8859_1 16384 1 - Live 0xffffffffc06b5000
  bladernr@galactica:~$ cat /proc/modules |grep nls_iso8859
  nls_iso8859_1 16384 1 - Live 0x0000000000000000
  
  Note that non-root reading returns a memory offset of 0x0 which is
  easily parsable.
+ 
+ Now, on 4.15, this has changed:
  
  ubuntu@xwing:~$ sudo cat /proc/modules |grep e1000e
  e1000e 249856 0 - Live 0xffffffffc0225000
  ptp 20480 2 igb,e1000e, Live 0xffffffffc00a9000
  ubuntu@xwing:~$ cat /proc/modules |grep e1000e
  e1000e 249856 0 - Live 0x          (null)
  ptp 20480 2 igb,e1000e, Live 0x          (null)
  
  Now, however, non-root reading returns a null reference which causes
  attempts to parse the offset to fail.
  
  I imagine this is probably by design, and it's a minor bug, but I wanted
  to raise it as it could cause issues when running userspace tools that
  parse /proc/modules on 4.15.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: linux-image-4.15.0-12-generic 4.15.0-12.13
  ProcVersionSignature: User Name 4.15.0-12.13-generic 4.15.7
  Uname: Linux 4.15.0-12-generic x86_64
  AlsaDevices:
-  total 0
-  crw-rw---- 1 root audio 116,  1 Mar 20 17:24 seq
-  crw-rw---- 1 root audio 116, 33 Mar 20 17:24 timer
+  total 0
+  crw-rw---- 1 root audio 116,  1 Mar 20 17:24 seq
+  crw-rw---- 1 root audio 116, 33 Mar 20 17:24 timer
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
  ApportVersion: 2.20.8-0ubuntu10
  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 Mar 20 17:59:51 2018
  MachineType: LENOVO INVALID
  PciMultimedia:
-  
+ 
  ProcEnviron:
-  TERM=xterm-256color
-  PATH=(custom, no user)
-  XDG_RUNTIME_DIR=<set>
-  LANG=C.UTF-8
-  SHELL=/bin/bash
+  TERM=xterm-256color
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=<set>
+  LANG=C.UTF-8
+  SHELL=/bin/bash
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-12-generic.efi.signed 
root=UUID=9fdf32ba-26ce-4d54-8457-dbd62057c7e9 ro
  RelatedPackageVersions:
-  linux-restricted-modules-4.15.0-12-generic N/A
-  linux-backports-modules-4.15.0-12-generic  N/A
-  linux-firmware                             1.173
+  linux-restricted-modules-4.15.0-12-generic N/A
+  linux-backports-modules-4.15.0-12-generic  N/A
+  linux-firmware                             1.173
  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/07/2017
  dmi.bios.vendor: LENOVO
  dmi.bios.version: FBKT97CUS
  dmi.board.name: ThinkServer RS140
  dmi.board.vendor: LENOVO
  dmi.board.version: Not Defined
  dmi.chassis.type: 7
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: To Be Filled By O.E.M.
  dmi.modalias: 
dmi:bvnLENOVO:bvrFBKT97CUS:bd04/07/2017:svnLENOVO:pnINVALID:pvrFFFFFFF:rvnLENOVO:rnThinkServerRS140:rvrNotDefined:cvnLENOVO:ct7:cvrToBeFilledByO.E.M.:
  dmi.product.family: To be filled by O.E.M.
  dmi.product.name: INVALID
  dmi.product.version: FFFFFFF
  dmi.sys.vendor: LENOVO

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1757217

Title:
  Behaviour change in reading /proc/modules could cause issues in
  userspace tools

Status in linux package in Ubuntu:
  New

Bug description:
  This was discovered while investigating tracebacks in the cert suite.
  We have a script that parses /proc/modules and returns the information
  in a more human-readable format as part of the info gathering we do
  during cert testing.

  On 4.13 and older kernels, this script was run as a normal user with
  no error.  On 4.15, this script dumps a python trace because
  /proc/modules now returns a null reference instead of just a blank
  memory offset.

  On 4.13 and older, when you read the file, you get something like this
  (root and non-root shown):

  bladernr@galactica:~$ sudo cat /proc/modules |grep nls_iso8859
  nls_iso8859_1 16384 1 - Live 0xffffffffc06b5000
  bladernr@galactica:~$ cat /proc/modules |grep nls_iso8859
  nls_iso8859_1 16384 1 - Live 0x0000000000000000

  Note that non-root reading returns a memory offset of 0x0 which is
  easily parsable.

  Now, on 4.15, this has changed:

  ubuntu@xwing:~$ sudo cat /proc/modules |grep e1000e
  e1000e 249856 0 - Live 0xffffffffc0225000
  ptp 20480 2 igb,e1000e, Live 0xffffffffc00a9000
  ubuntu@xwing:~$ cat /proc/modules |grep e1000e
  e1000e 249856 0 - Live 0x          (null)
  ptp 20480 2 igb,e1000e, Live 0x          (null)

  Now, however, non-root reading returns a null reference which causes
  attempts to parse the offset to fail.

  I imagine this is probably by design, and it's a minor bug, but I
  wanted to raise it as it could cause issues when running userspace
  tools that parse /proc/modules on 4.15.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: linux-image-4.15.0-12-generic 4.15.0-12.13
  ProcVersionSignature: User Name 4.15.0-12.13-generic 4.15.7
  Uname: Linux 4.15.0-12-generic x86_64
  AlsaDevices:
   total 0
   crw-rw---- 1 root audio 116,  1 Mar 20 17:24 seq
   crw-rw---- 1 root audio 116, 33 Mar 20 17:24 timer
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
  ApportVersion: 2.20.8-0ubuntu10
  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 Mar 20 17:59:51 2018
  MachineType: LENOVO INVALID
  PciMultimedia:

  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-12-generic.efi.signed 
root=UUID=9fdf32ba-26ce-4d54-8457-dbd62057c7e9 ro
  RelatedPackageVersions:
   linux-restricted-modules-4.15.0-12-generic N/A
   linux-backports-modules-4.15.0-12-generic  N/A
   linux-firmware                             1.173
  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/07/2017
  dmi.bios.vendor: LENOVO
  dmi.bios.version: FBKT97CUS
  dmi.board.name: ThinkServer RS140
  dmi.board.vendor: LENOVO
  dmi.board.version: Not Defined
  dmi.chassis.type: 7
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: To Be Filled By O.E.M.
  dmi.modalias: 
dmi:bvnLENOVO:bvrFBKT97CUS:bd04/07/2017:svnLENOVO:pnINVALID:pvrFFFFFFF:rvnLENOVO:rnThinkServerRS140:rvrNotDefined:cvnLENOVO:ct7:cvrToBeFilledByO.E.M.:
  dmi.product.family: To be filled by O.E.M.
  dmi.product.name: INVALID
  dmi.product.version: FFFFFFF
  dmi.sys.vendor: LENOVO

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1757217/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to