Public bug reported:

ldmtool fails to scan disk for ldm data on 32-bit system

open("/dev/sda", O_RDONLY)              = 3
ioctl(3, BLKSSZGET, [512])              = 0
pread64(3, 
"3\300\216\320\274\0|\373P\7P\37\374\276\33|\277\33\6PW\271\345\1\363\244\313\275\276\7\261\4"...,
 512, 0) = 512
pread64(3, 
"PRIVHEAD\0\0=\4\0\2\0\v\1\3231h\235\33\376\266\0\0\0\0\0\0\0051"..., 391, 
3072) = 391
fstat64(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
ioctl(3, BLKGETSIZE64, [320072933376])  = 0
mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb6eb0000
pread64(3, 0xb6eb0008, 1048576, 18446744071658889216) = -1 EINVAL (Invalid 
argument)

syscall pread64 is expecting 64bit offset here, but on 32-bit system only 4 
bytes are pushed on stack so it grabs garbage for missing 32 bits.
There should be #define _FILE_OFFSET_BITS 64 set somewhere in the code.

I am not very familiar with ubuntu's development to submit correct patch
on my own :)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ldmtool 0.2.3-3
ProcVersionSignature: Ubuntu 4.4.0-93.116-generic 4.4.79
Uname: Linux 4.4.0-93-generic i686
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: i386
CurrentDesktop: Unity
Date: Wed Sep 20 00:55:24 2017
InstallationDate: Installed on 2017-09-16 (3 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release i386 (20170801)
SourcePackage: libldm
UpgradeStatus: No upgrade log present (probably fresh install)

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


** Tags: apport-bug i386 xenial

** Description changed:

- ldmtoo fails to scan disk for ldm data on 32-bit system
+ ldmtool fails to scan disk for ldm data on 32-bit system
  
  open("/dev/sda", O_RDONLY)              = 3
  ioctl(3, BLKSSZGET, [512])              = 0
  pread64(3, 
"3\300\216\320\274\0|\373P\7P\37\374\276\33|\277\33\6PW\271\345\1\363\244\313\275\276\7\261\4"...,
 512, 0) = 512
  pread64(3, 
"PRIVHEAD\0\0=\4\0\2\0\v\1\3231h\235\33\376\266\0\0\0\0\0\0\0051"..., 391, 
3072) = 391
  fstat64(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
  ioctl(3, BLKGETSIZE64, [320072933376])  = 0
  mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xb6eb0000
  pread64(3, 0xb6eb0008, 1048576, 18446744071658889216) = -1 EINVAL (Invalid 
argument)
- 
  
  syscall pread64 is expecting 64bit offset here, but on 32-bit system only 4 
bytes are pushed on stack so it grabs garbage for missing 32 bits.
  There should be #define _FILE_OFFSET_BITS 64 set somewhere in the code.
  
  I am not very familiar with ubuntu's development to submit correct patch
  on my own :)
  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: ldmtool 0.2.3-3
  ProcVersionSignature: Ubuntu 4.4.0-93.116-generic 4.4.79
  Uname: Linux 4.4.0-93-generic i686
  ApportVersion: 2.20.1-0ubuntu2.10
  Architecture: i386
  CurrentDesktop: Unity
  Date: Wed Sep 20 00:55:24 2017
  InstallationDate: Installed on 2017-09-16 (3 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release i386 (20170801)
  SourcePackage: libldm
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1718304

Title:
  i386 build is broken, missing defines for 64-bit file operations in
  source

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to