Package: lphdisk
Version: 0.9.1-2
Severity: critical
Tags: patch
Justification: causes serious data loss / breaks whole system


The latest few versions of lphdisk completely and utterly break the system. If 
run, lphdisk destroys the entire MBR and parition table.

I've tracked this down at least partially to a bunch of broken syscall stuff in 
the Debian patches. The following patch makes it work correctly without 
corrupting anything by getting rid of the broken syscall stuff completely. I 
can't guarnatee that this fixes it for everyone, but without this patch or 
another fix, anyone running this program would nuke their entire system.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages lphdisk depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries

lphdisk recommends no packages.

-- no debconf information
Only in lphdisk-0.9.1.working/debian: files
Only in lphdisk-0.9.1.working/debian: lphdisk
Only in lphdisk-0.9.1.working/debian: lphdisk.substvars
Only in lphdisk-0.9.1.working/debian: stamp-makefile-build
Only in lphdisk-0.9.1.working/: lphdisk
diff -ur lphdisk-0.9.1/lphdisk.c lphdisk-0.9.1.working/lphdisk.c
--- lphdisk-0.9.1/lphdisk.c	2006-11-28 11:47:57.000000000 -0700
+++ lphdisk-0.9.1.working/lphdisk.c	2006-11-28 11:26:55.000000000 -0700
@@ -112,23 +112,6 @@
 
 typedef long long lloff_t;
 
-#ifdef SYS__llseek
-
-#define _llseek(fd, offset_high, offset_low, result, origin) \
-	syscall(SYS__llseek, fd, offset_high, offset_low, result, origin)
-
-lloff_t llseek (unsigned int fd, lloff_t offset, unsigned int origin) {
-  lloff_t result;
-  int retval;
-
-  retval = _llseek (fd, ((unsigned long long) offset) >> 32,
-                   ((unsigned long long) offset) & 0xffffffff,
-                   &result, origin);
-  return (retval == -1 ? (lloff_t) retval : result);
-}
-
-#else /* SYS__llseek */
-
 /* Somehow, SYS__llseek wasn't in sys/syscall.h.  This shouldn't ever        */
 /* happen, but better safe than sorry.. The best we can do is emulate it     */
 /* with lseek, and hope we don't get an offset that's too large (throw an    */
@@ -147,7 +130,6 @@
   }
 }
 
-#endif /* SYS__llseek */
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
Only in lphdisk-0.9.1.working/: lphdisk.o
Only in lphdisk-0.9.1.working/lrmi-0.6m: lrmi.o
Only in lphdisk-0.9.1.working/: lrmi.h
Only in lphdisk-0.9.1.working/: lrmi.o
Only in lphdisk-0.9.1.working/: vbe.h

Reply via email to