#1011325 drivers/upekts.so: Segmentation fault at startup

Package:
biometric-driver-community-multidevice
Source:
biometric-authentication
Description:
Biometric Authentication Driver (community multidevice)
Submitter:
Damyan Ivanov
Date:
2022-06-21 08:03:02 UTC
Severity:
important
#1011325#5
Date:
2022-05-20 06:13:15 UTC
From:
To:
Hi,

Upon startup, the biometric-auth service fails with segmentation violation
and a core dump:

 systemd[1]: Starting Authenticate by human biometric...
 biometric-authenticationd[1343]: [ NOTE] Database format version is 1.1.0
 biometric-authenticationd[1343]: [ NOTE] The database format is compatible with the current framework
 systemd[1]: biometric-authentication.service: Main process exited, code=dumped, status=11/SEGV
 systemd[1]: biometric-authentication.service: Failed with result 'core-dump'.
 systemd[1]: Failed to start Authenticate by human biometric.

Here's the stack contents:

 Thread 3 (Thread 0x7f362ad5d640 (LWP 1717)):
 #0  0x00007f362f3bd87f in __GI___poll (fds=0x7f3624000b80, nfds=2, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:29
 #1  0x00007f362f4d9319 in ?? () from /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
 #2  0x00007f362f4d67f9 in ?? () from /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
 #3  0x00007f362f4d7d78 in libusb_handle_events_timeout_completed () from /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
 #4  0x00007f362aff808e in ?? () from /usr/lib/x86_64-linux-gnu/libgusb.so.2
 #5  0x00007f362f56859d in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
 #6  0x00007f362f4afd80 in start_thread (arg=0x7f362ad5d640) at pthread_create.c:481
 #7  0x00007f362f3c976f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

 Thread 2 (Thread 0x7f362e77e640 (LWP 1716)):
 #0  0x00007f362f3bd87f in __GI___poll (fds=0x7f362e77dc60, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
 #1  0x00007f362f4de497 in ?? () from /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
 #2  0x00007f362f4afd80 in start_thread (arg=0x7f362e77e640) at pthread_create.c:481
 #3  0x00007f362f3c976f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

 Thread 1 (Thread 0x7f362ea4cd80 (LWP 1715)):
 #0  0x00007f362f8a3941 in community_ops_discover (dev=0x559071a61c80) at ../../../../src/drivers/community-multidevice/community_ops.c:60
 #1  0x00007f362f890cea in bio_device_list_init () from /usr/lib/x86_64-linux-gnu/libbiometric.so.0
 #2  0x000055907179ef3b in ?? ()
 #3  0x000055907179bc26 in ?? ()
 #4  0x00007f362f2f27fd in __libc_start_main (main=0x55907179ba30, argc=1, argv=0x7ffc50d2cde8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc50d2cdd8) at ../csu/libc-start.c:332
 #5  0x000055907179be6a in ?? ()

The segmentation fault is in Thread 1 (upekts.so)

The machine is a ThinkPad X1 Carbon 5th. It has a fingerprint sensor:

 Bus 001 Device 004: ID 138a:0097 Validity Sensors, Inc.

I guess it is not supported, but still, a segmentation fault is a bit too harsh
:)

#1011325#10
Date:
2022-06-21 07:59:42 UTC
From:
To:

Hello Damyan,
I was just looking through random bugs and got here.
(Without the hardware to reproduce.)

When I assume the crash happened in thread 1,
then it happens at this line: [1]

   60 	if ((strcmp(getenv("BIO_PRINT_LEVEL"), "7") == 0) && (strcmp(getenv("BIO_PRINT_COLOR"), "1") == 0))
   61 		setenv ("G_MESSAGES_DEBUG", "all", 0);

Both getenv might return NULL, and passing these to strcmp
seems to be undefined behaviour.
Therefore it might be interesting to see what happens
if these environments get actually set?
Not necessarily to the values expected above.

But I am not sure as I would expect seeing the strcmp in the backtrace.

Kind regards,
Bernhard

[1] https://sources.debian.org/src/biometric-authentication/0.9.71-1/src/drivers/community-multidevice/community_ops.c/#L60