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

Bug#918116: intel-gpu-tools: Unable to read its own config files due to use-after-free



Package: intel-gpu-tools
Version: 1.22-1
Severity: normal

With a recent libc update, the register access tools all fail like this:

Error: /usr/share/intel-gpu-tools/registers/common_display.txt:1: ('CPU_VGACNTRL', '0x00041000', '')
Error: /usr/share/intel-gpu-tools/registers/haswell:1: common_display.txt
Warning: reading '/usr/share/intel-gpu-tools/registers/haswell' failed. Using builtin register spec.

Some gdb work tracked this down to a use-after free in the parsing code
(tools/intel_reg_spec.c)

                } else if (i == 2) {
                        reg->addr = strtoul(p, &e, 16);
                        free(p);
                        if (*e)
                                ret = -1;

It seems that it "got away" with this with older libc versions, but
something changed between the libc in stretch and that in buster and now
this use-after-free reliably fails every time for me.

-- System Information:
Debian Release: 9.6
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing'), (490, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages intel-gpu-tools depends on:
ii  libc6          2.28-2
ii  libcairo2      1.16.0-2
ii  libdrm-intel1  2.4.74-1
ii  libdrm2        2.4.95-1
ii  libkmod2       23-2
ii  libpciaccess0  0.13.4-1+b2
ii  libprocps6     2:3.3.12-3+deb9u1
ii  libudev1       232-25+deb9u6
ii  libunwind8     1.1-4.1
ii  libx11-6       2:1.6.4-3+deb9u1
ii  libxext6       2:1.3.3-1+b2
ii  libxrandr2     2:1.5.1-1
ii  libxv1         2:1.0.11-1
ii  zlib1g         1:1.2.11.dfsg-1

intel-gpu-tools recommends no packages.

intel-gpu-tools suggests no packages.

-- no debconf information


Reply to: