Package: extlinux
Version: 2:4.05+dfsg-5
Severity: normal

There are at least two issues in extlinux here.

extlinux --once does not print newline after the error message.
For example (running on a read-only /boot):

 # extlinux --once "3.2.0-amd64" /boot
 /boot is device /dev/sda2
 Bad file descriptor# _

(note the cursor position).

This is one, minor issue.


Another issue is that it actually does not check if open(2)
succeeded before trying to modify --once argument:

...
open("/boot/ldlinux.sys", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=32256, ...}) = 0
pread64(4, 
"\245/-Zg\27\4\243\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024, 
31232) = 1024
close(4)                                = 0
open("/boot/ldlinux.sys", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=32256, ...}) = 0
pread64(4, 
"\245/-Zg\27\4\243\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024, 
31232) = 1024
fstat64(4, {st_mode=S_IFREG|0444, st_size=32256, ...}) = 0
ioctl(4, FS_IOC32_GETFLAGS or FS_IOC_GETFLAGS, 0xffde860c) = 0
ioctl(4, FS_IOC32_SETFLAGS or FS_IOC_SETFLAGS, 0xffde860c) = -1 EROFS 
(Read-only file system)
fchmod(4, 0100644)                      = -1 EROFS (Read-only file system)
close(4)                                = 0
open("/boot/ldlinux.sys", O_RDWR|O_SYNC|O_LARGEFILE|0x100000) = -1 EROFS 
(Read-only file system)
pwrite64(-1, "\245/-Z\237p<\21\1\v3.2.0-amd64\0\0\0\0\0\0\0\0\0\0\0"..., 1024, 
31232) = -1 EBADF (Bad file descriptor)
write(2, "Bad file descriptor", 19Bad file descriptor)     = 19

(also fchmod(2) return isn't checked)

The same happens with --clear-once too.

Thanks,

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to