From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 97993] amdgpu_query_gpu_info () segfaults when user does not have permission to open /dev/dri/card* Date: Fri, 30 Sep 2016 15:50:50 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2009057468==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E57B6E144 for ; Fri, 30 Sep 2016 15:50:50 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============2009057468== Content-Type: multipart/alternative; boundary="14752506500.A7e398d5.5098"; charset="UTF-8" --14752506500.A7e398d5.5098 Date: Fri, 30 Sep 2016 15:50:50 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D97993 Bug ID: 97993 Summary: amdgpu_query_gpu_info () segfaults when user does not have permission to open /dev/dri/card* Product: DRI Version: unspecified Hardware: All OS: Linux (All) Status: NEW Severity: critical Priority: medium Component: DRM/AMDgpu-pro Assignee: dri-devel@lists.freedesktop.org Reporter: vedran@miletic.net $ gdb clinfo GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from clinfo...(no debugging symbols found)...done. (gdb) run Starting program: /usr/bin/clinfo=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007ffff061bd22 in amdgpu_query_gpu_info () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libdrm_amdgpu.so.1 (gdb) backtrace #0 0x00007ffff061bd22 in amdgpu_query_gpu_info () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libdrm_amdgpu.so.1 #1 0x00007ffff39d7fae in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #2 0x00007ffff39d861b in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #3 0x00007ffff39daceb in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #4 0x00007ffff39ca848 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #5 0x00007ffff36bcf0b in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #6 0x00007ffff363e2d9 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #7 0x00007ffff363e337 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #8 0x00007ffff363f0c9 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #9 0x00007ffff3605d48 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #10 0x00007ffff36071e7 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #11 0x00007ffff3607376 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #12 0x00007ffff35c5300 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #13 0x00007ffff35e0947 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #14 0x00007ffff35aea03 in clIcdGetPlatformIDsKHR () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so #15 0x00007ffff74bd76e in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1 #16 0x00007ffff74bf647 in ?? () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1 #17 0x00007ffff7096ad9 in __pthread_once_slow (once_control=3D0x7ffff76c13d= 8, init_routine=3D0x7ffff74bf4a0) at pthread_once.c:116 #18 0x00007ffff74bdd31 in clGetPlatformIDs () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1 #19 0x000000000040f4c7 in ?? () #20 0x0000000000407bb2 in ?? () #21 0x00007ffff6cdf830 in __libc_start_main (main=3D0x407b00, argc=3D1, argv=3D0x7fffffffe4a8, init=3D, fini=3D, rtld_fini=3D, stack_end=3D0x7fffffffe498) at ../csu/libc-sta= rt.c:291 #22 0x000000000040e5f1 in ?? () It should fail without segfault. --=20 You are receiving this mail because: You are the assignee for the bug.= --14752506500.A7e398d5.5098 Date: Fri, 30 Sep 2016 15:50:50 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 97993
Summary amdgpu_query_gpu_info () segfaults when user does not have pe= rmission to open /dev/dri/card*
Product DRI
Version unspecified
Hardware All
OS Linux (All)
Status NEW
Severity critical
Priority medium
Component DRM/AMDgpu-pro
Assignee dri-devel@lists.freedesktop.org
Reporter vedran@miletic.net

$ gdb clinfo
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copy=
ing"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/so=
ftware/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.g=
nu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word&=
quot;...
Reading symbols from clinfo...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/clinfo=20
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so=
.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff061bd22 in amdgpu_query_gpu_info () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libdrm_amdgpu.so.1
(gdb) backtrace
#0  0x00007ffff061bd22 in amdgpu_query_gpu_info () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libdrm_amdgpu.so.1
#1  0x00007ffff39d7fae in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#2  0x00007ffff39d861b in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#3  0x00007ffff39daceb in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#4  0x00007ffff39ca848 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#5  0x00007ffff36bcf0b in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#6  0x00007ffff363e2d9 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#7  0x00007ffff363e337 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#8  0x00007ffff363f0c9 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#9  0x00007ffff3605d48 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#10 0x00007ffff36071e7 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#11 0x00007ffff3607376 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#12 0x00007ffff35c5300 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#13 0x00007ffff35e0947 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#14 0x00007ffff35aea03 in clIcdGetPlatformIDsKHR () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so
#15 0x00007ffff74bd76e in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
#16 0x00007ffff74bf647 in ?? () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
#17 0x00007ffff7096ad9 in __pthread_once_slow (once_control=3D0x7ffff76c13d=
8,
init_routine=3D0x7ffff74bf4a0) at pthread_once.c:116
#18 0x00007ffff74bdd31 in clGetPlatformIDs () from
/usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
#19 0x000000000040f4c7 in ?? ()
#20 0x0000000000407bb2 in ?? ()
#21 0x00007ffff6cdf830 in __libc_start_main (main=3D0x407b00, argc=3D1,
argv=3D0x7fffffffe4a8, init=3D<optimized out>, fini=3D<optimized o=
ut>,
rtld_fini=3D<optimized out>, stack_end=3D0x7fffffffe498) at ../csu/li=
bc-start.c:291
#22 0x000000000040e5f1 in ?? ()

It should fail without segfault.


You are receiving this mail because:
  • You are the assignee for the bug.
= --14752506500.A7e398d5.5098-- --===============2009057468== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============2009057468==--