libevdev-1.13.3-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1]
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-names.c: scope_hint: In function ‘type_from_prefix’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-names.c:92:21: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-names.c:92:21: note: read of 3 bytes from after the end of ‘"EV_ABS"’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-names.c:92:21: note: valid subscripts for ‘"EV_ABS"’ are ‘[0]’ to ‘[6]’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-names.c:9: included_from: Included from here.
/usr/include/string.h:407:15: note: argument 1 of ‘strlen’ must be a pointer to a null-terminated string
#   90|   		/* skip EV_ prefix so @e is suffix of [EV_]XYZ */
#   91|   		e = &ev_names[i].name[3];
#   92|-> 		l = strlen(e);
#   93|   
#   94|   		/* compare prefix and test for trailing _ */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-uinput.c: scope_hint: In function ‘fetch_syspath_and_devnode’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-uinput.c:279:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*uinput_dev.name’ where non-null expected
/usr/include/bits/stat.h:25: included_from: Included from here.
/usr/include/fcntl.h:78: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-uinput.c:9: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-uinput.c:13: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
#  277|   
#  278|   		buf[len - 1] = '\0'; /* file contains \n */
#  279|-> 		if (strcmp(buf, uinput_dev->name) == 0) {
#  280|   			if (uinput_dev->syspath) {
#  281|   				/* FIXME: could descend into bit comparison here */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev.c: scope_hint: In function ‘init_slots’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev.c:361:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/include/asm/ioctl.h:1: included_from: Included from here.
/usr/include/linux/ioctl.h:5: included_from: Included from here.
/usr/include/asm-generic/ioctls.h:5: included_from: Included from here.
/usr/include/asm/ioctls.h:1: included_from: Included from here.
/usr/include/bits/ioctls.h:23: included_from: Included from here.
/usr/include/sys/ioctl.h:26: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/include/linux/linux/input.h:14: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/include/linux/input.h:2: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev.h:33: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:14: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev.c:17: included_from: Included from here.
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev.c:1661:29: note: in expansion of macro ‘EVIOCSABS’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:315:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:315:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:315:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:292:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:292:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.3-build/libevdev-1.13.3/libevdev/libevdev-int.h:292:17: note: in expansion of macro ‘max_mask’
#  359|   
#  360|   	free_slots(dev);
#  361|-> 	dev->num_slots = abs_info->maximum + 1;
#  362|   	dev->mt_slot_vals = calloc(dev->num_slots * ABS_MT_CNT, sizeof(int));
#  363|   	if (!dev->mt_slot_vals) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
libevdev-1.13.3-build/libevdev-1.13.3/tools/libevdev-tweak-device.c: scope_hint: In function ‘set_abs’
libevdev-1.13.3-build/libevdev-1.13.3/tools/libevdev-tweak-device.c:323:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.maximum’
#  321|   		abs.minimum = absinfo->minimum;
#  322|   	if (changes & OPT_MAX)
#  323|-> 		abs.maximum = absinfo->maximum;
#  324|   	if (changes & OPT_FUZZ)
#  325|   		abs.fuzz = absinfo->fuzz;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
libevdev-1.13.3-build/libevdev-1.13.3/tools/libevdev-tweak-device.c:325:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.fuzz’
#  323|   		abs.maximum = absinfo->maximum;
#  324|   	if (changes & OPT_FUZZ)
#  325|-> 		abs.fuzz = absinfo->fuzz;
#  326|   	if (changes & OPT_FLAT)
#  327|   		abs.flat = absinfo->flat;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
libevdev-1.13.3-build/libevdev-1.13.3/tools/libevdev-tweak-device.c:327:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.flat’
#  325|   		abs.fuzz = absinfo->fuzz;
#  326|   	if (changes & OPT_FLAT)
#  327|-> 		abs.flat = absinfo->flat;
#  328|   	if (changes & OPT_RES)
#  329|   		abs.resolution = absinfo->resolution;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
libevdev-1.13.3-build/libevdev-1.13.3/tools/libevdev-tweak-device.c:329:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.resolution’
#  327|   		abs.flat = absinfo->flat;
#  328|   	if (changes & OPT_RES)
#  329|-> 		abs.resolution = absinfo->resolution;
#  330|   
#  331|   	rc = libevdev_kernel_set_abs_info(dev, axis, &abs);

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-5.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibevdev-1.13.3-1.fc42
store-results-to/tmp/tmp5z1elm2x/libevdev-1.13.3-1.fc42.tar.xz
time-created2024-11-13 01:21:40
time-finished2024-11-13 01:22:52
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp5z1elm2x/libevdev-1.13.3-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp5z1elm2x/libevdev-1.13.3-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9