From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 109977] Segmentation fault in drmParsePlatformDeviceInfo
Date: Tue, 12 Mar 2019 11:22:46 +0000
Message-ID:
Bug ID
109977
Summary
Segmentation fault in drmParsePlatformDeviceInfo
Product
DRI
Version
XOrg git
Hardware
All
OS
All
Status
NEW
Severity
normal
Priority
medium
Component
libdrm
Assignee
dri-devel@lists.freedesktop.org
Reporter
ichgeh@imkreisrum.de
Created attachment 143633 [details]
[PATCH libdrm] xf86drm: Fix segmentation fault while parsing device info
Since commit ee798b98479709acdd8d1492689dc93c1a62f239 (xf85drm: de-duplicate
drmParse{Platform.Host1x}{Bus,Device}Info)
I encounter a segfault at line 3632:
*compatible[i] =3D tmp_name;
Libdrm segfaults as soon as i>0.=20
This was encountered on armhf platform (Allwinner A10) with kernel 5.0
including drm-misc-next and the lima driver
(https://gitlab.freedesktop.org/lima/linux/commits/lima-drm-=
misc-next-20190309)
and the lima mesa branch (https://gitlab.freedesktop.org/lima/mesa) while
running glmark2-es2-drm and kmscube.
You can see the original issue including backtrace and strace reported here:
=
https://gitlab.freedesktop.org/lima/mesa/issues/80#note_129271
The attached patch fixes it.