<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Segmentation fault in drmParsePlatformDeviceInfo"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109977">109977</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segmentation fault in drmParsePlatformDeviceInfo
</td>
</tr>
<tr>
<th>Product</th>
<td>DRI
</td>
</tr>
<tr>
<th>Version</th>
<td>XOrg git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>libdrm
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dri-devel@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ichgeh@imkreisrum.de
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=143633" name="attach_143633" title="[PATCH libdrm] xf86drm: Fix segmentation fault while parsing device info">attachment 143633</a> <a href="attachment.cgi?id=143633&action=edit" title="[PATCH libdrm] xf86drm: Fix segmentation fault while parsing device info">[details]</a></span>
[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] = tmp_name;
Libdrm segfaults as soon as i>0.
This was encountered on armhf platform (Allwinner A10) with kernel 5.0
including drm-misc-next and the lima driver
(<a href="https://gitlab.freedesktop.org/lima/linux/commits/lima-drm-misc-next-20190309">https://gitlab.freedesktop.org/lima/linux/commits/lima-drm-misc-next-20190309</a>)
and the lima mesa branch (<a href="https://gitlab.freedesktop.org/lima/mesa">https://gitlab.freedesktop.org/lima/mesa</a>) while
running glmark2-es2-drm and kmscube.
You can see the original issue including backtrace and strace reported here:
<a href="https://gitlab.freedesktop.org/lima/mesa/issues/80#note_129271">https://gitlab.freedesktop.org/lima/mesa/issues/80#note_129271</a>
The attached patch fixes it.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>