Bug 106730 - Fix SIGABRT when trying to allocate MAXINT amounts of RAM
Summary: Fix SIGABRT when trying to allocate MAXINT amounts of RAM
Status: RESOLVED MOVED
Alias: None
Product: libfprint
Classification: Unclassified
Component: libfprint (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: libfprint-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-30 13:54 UTC by Bastien Nocera
Modified: 2018-05-31 08:55 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
assembling: Add guards to fpi_assemble_lines() (970 bytes, patch)
2018-05-30 13:55 UTC, Bastien Nocera
Details | Splinter Review
vfs5011: Error out when no lines were captured (1.79 KB, patch)
2018-05-30 13:55 UTC, Bastien Nocera
Details | Splinter Review

Description Bastien Nocera 2018-05-30 13:54:46 UTC
See patches.
Comment 1 Bastien Nocera 2018-05-30 13:55:17 UTC
Created attachment 139858 [details] [review]
assembling: Add guards to fpi_assemble_lines()

With the goal of not crashing when we try to malloc MAXINT bytes of RAM.

See https://bugzilla.redhat.com/show_bug.cgi?id=1484812
Comment 2 Bastien Nocera 2018-05-30 13:55:20 UTC
Created attachment 139859 [details] [review]
vfs5011: Error out when no lines were captured

Which avoids passing zero lines to fpi_assemble_lines()

"gmem.c:130: failed to allocate 18446744073709551612 bytes"

 #3  0x00007fe4f6ef428f in g_log (log_domain=log_domain@entry=0x7fe4f6f3506e "GLib", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7fe4f6f3e610 "%s: failed to allocate %lu bytes") at gmessages.c:1398
 #4  0x00007fe4f6ef2ac4 in g_malloc0 (n_bytes=n_bytes@entry=18446744073709551612) at gmem.c:129
 #5  0x00007fe4f8052020 in median_filter (filtersize=25, size=-1, data=0x0) at assembling.c:309
 #6  fpi_assemble_lines (ctx=ctx@entry=0x7fe4f82ac3c0 <assembling_ctx>, lines=0x0, lines_len=0) at assembling.c:389
 #7  0x00007fe4f805f3db in submit_image (ssm=ssm@entry=0x16c3cba360, data=data@entry=0x16c3cb9cc0) at drivers/vfs5011.c:412

See https://bugzilla.redhat.com/show_bug.cgi?id=1484812
Comment 3 Bastien Nocera 2018-05-30 13:57:18 UTC
If someone has access to a VFS5011 device.
Comment 4 Vasily Khoruzhick 2018-05-30 19:17:08 UTC
(In reply to Bastien Nocera from comment #3)
> If someone has access to a VFS5011 device.

I can test it tonight.
Comment 5 Vasily Khoruzhick 2018-05-30 19:57:37 UTC
(In reply to Vasily Khoruzhick from comment #4)
> (In reply to Bastien Nocera from comment #3)
> > If someone has access to a VFS5011 device.
> 
> I can test it tonight.

Sorry, I can't. VFS5011 in my laptop appears to be broken - it got some dead pixels in the middle and it confuses finger detection in the driver
Comment 6 GitLab Migration User 2018-05-31 08:55:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/libfprint/libfprint/issues/42.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.