[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#776488: regression: arm map_hardware[] not NULL terminated



Package: libdebian-installer4
Version: 0.98
Severity: serious
Tags: d-i patch

The map_hardware[] table in src/system/subarch-arm-linux.c is no longer NULL
terminated. I believe this could lead to a segfault on armel/armhf platforms,
resulting in a failed install.

This bug was introduced back in version 0.92. The end of the table was trimmed,
and accidentally took the NULL terminator with it:
  http://anonscm.debian.org/cgit/d-i/libdebian-installer.git/commit/?id=3a7209e49fa5cfe8c4e4122325405022031a8afc
  
DISCLAIMER: I haven't actually observed a crash, I just discovered this while
reviewing source. But it does seem like a potential time-bomb we should fix
pre-release. Here's the obvious patch:

diff --git a/src/system/subarch-arm-linux.c b/src/system/subarch-arm-linux.c
index 590576a..3fc5e2a 100644
--- a/src/system/subarch-arm-linux.c
+++ b/src/system/subarch-arm-linux.c
@@ -103,6 +103,7 @@ static struct map map_hardware[] = {
     { "OMAP3 Beagle Board", "omap" },
     { "OMAP4 Panda Board", "omap" },
     { "ARM-Versatile Express", "vexpress" },
+    { NULL, NULL }
 };
 
 static int read_dt_model(char *entry, int entry_len)

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libdebian-installer4 depends on:
ii  libc6              2.19-13
ii  multiarch-support  2.19-13

libdebian-installer4 recommends no packages.

libdebian-installer4 suggests no packages.

-- no debconf information


Reply to: