Skip to contentSkip to conversation

libgpiod: update to v2.2.4

PATCH New Bartosz Golaszewski 1 participant 2 messages Apr 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libgpiod: update to v2.2.4

Bug-fix release addressing several issues discovered during an AI-augmented security audit. The most severe bug was found in the C extension code of the python bindings - which also get an update - but there were some memory leaks and integer overflow bugs in the core C library as well as in tools and DBus daemon.

Full changelog:

Bug fixes:
- fix buffer over-read bugs when translating uAPI structs to library types
- fix variable and argument types where necessary
- sanitize values returned by the kernel to avoid potential buffer overflows
- fix memory leaks in gpio-tools
- add missing return value checks in gpio-tools
- fix period parsing in gpio-tools
- use correct loop counter in error path in gpio-manager

Improvements:
- make tests work with newer coreutils by removing cases checking tools' behavior on SIGINT which stopped working due to changes in behavior of the timeout tool

Also: drop the patch that's now upstream from the recipe.

---
 ...tools-tests-remove-SIGINT-test-cases.patch | 83 -------------------
 .../{libgpiod_2.2.3.bb => libgpiod_2.2.4.bb}  |  3 +-
 2 files changed, 1 insertion(+), 85 deletions(-)
 delete mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-tools-tests-remove-SIGINT-test-cases.patch
 rename meta-oe/recipes-support/libgpiod/{libgpiod_2.2.3.bb => libgpiod_2.2.4.bb} (96%)
meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-tools-tests-remove-SIGINT-test-cases.patch deleted +0 -83
deleted file mode 100644
index 7fe06b9882..0000000000
@@ -1,83 +0,0 @@
-From 3c38c5f9ab49384039f35408656a88f87619dd03 Mon Sep 17 00:00:00 2001
-From: Bartosz Golaszewski <[email protected]>
-Date: Wed, 18 Mar 2026 14:07:06 +0100
-Subject: [libgpiod][PATCH] tools: tests: remove SIGINT test cases
-
-In coreutils v9.10 (specifically with commit 8c2461933411 ("timeout:
-honor ignored signal dispositions")) the behavior of timeout changed and
-it will no longer propagate SIGINT or SIGQUIT in shell background jobs.
-This breaks the test cases checking the behavior of tools after SIGINT.
-We have to assume that if exit after SIGTERM works, then so does it
-after SIGINT and remove the failing tests.
-
-Upstream-Status: Submitted [https://lore.kernel.org/all/[email protected]/]
-Signed-off-by: Bartosz Golaszewski <[email protected]>
----
- tools/gpio-tools-test.bash | 37 -------------------------------------
- 1 file changed, 37 deletions(-)
-
-diff --git a/tools/gpio-tools-test.bash b/tools/gpio-tools-test.bash
-index 71d6e3d..62f6836 100755
---- a/tools/gpio-tools-test.bash
-+++ b/tools/gpio-tools-test.bash
-@@ -1415,17 +1415,6 @@ test_gpioset_with_lines_strictly_by_name() {
- 	gpiosim_check_value sim0 6 0
- }
- 
--test_gpioset_interactive_after_SIGINT() {
--	gpiosim_chip sim0 num_lines=8 line_name=1:foo
--
--	dut_run gpioset -i foo=1
--
--	dut_kill -SIGINT
--	dut_wait
--
--	status_is 130
--}
--
- test_gpioset_interactive_after_SIGTERM() {
- 	gpiosim_chip sim0 num_lines=8 line_name=1:foo
- 
-@@ -1907,20 +1896,6 @@ test_gpiomon_multiple_lines_across_multiple_chips() {
- 	assert_fail dut_readable
- }
- 
--test_gpiomon_exit_after_SIGINT() {
--	gpiosim_chip sim0 num_lines=8
--
--	local sim0=${GPIOSIM_CHIP_NAME[sim0]}
--
--	dut_run gpiomon --banner --chip "$sim0" 4
--	dut_regex_match "Monitoring line .*"
--
--	dut_kill -SIGINT
--	dut_wait
--
--	status_is 130
--}
--
- test_gpiomon_exit_after_SIGTERM() {
- 	gpiosim_chip sim0 num_lines=8
- 
-@@ -2503,18 +2478,6 @@ test_gpionotify_multiple_lines_across_multiple_chips() {
- 	assert_fail dut_readable
- }
- 
--test_gpionotify_exit_after_SIGINT() {
--	gpiosim_chip sim0 num_lines=8
--
--	dut_run gpionotify --banner --chip "${GPIOSIM_CHIP_NAME[sim0]}" 4
--	dut_regex_match "Watching line .*"
--
--	dut_kill -SIGINT
--	dut_wait
--
--	status_is 130
--}
--
- test_gpionotify_exit_after_SIGTERM() {
- 	gpiosim_chip sim0 num_lines=8
- 
--- 
-2.47.3
-
meta-oe/recipes-support/libgpiod/libgpiod_2.2.4.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod_2.2.3.bb +1 -2
similarity index 96%
rename from meta-oe/recipes-support/libgpiod/libgpiod_2.2.3.bb
rename to meta-oe/recipes-support/libgpiod/libgpiod_2.2.4.bb
index 38829a620f..2c8d9f1873 100644
@@ -13,10 +13,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-2.x:"
 
 SRC_URI += " \
     file://gpio-manager.init \
-    file://0001-tools-tests-remove-SIGINT-test-cases.patch \
 "
 
-SRC_URI[sha256sum] = "70012b0262e4b90f140431efa841ca89643b02ea6c09f507e23cec664a51b71a"
+SRC_URI[sha256sum] = "13207176b0eb9b3e0f02552d5f49f5a6a449343ce47416158bb484d9d3019592"
 
 # Enable all project features for ptest
 PACKAGECONFIG[tests] = " \
Signature · 1 line
2.47.3
#1 lore raw

PATCH 2/2 python3-gpiod: update to v2.4.2

Bug-fix release addressing a buffer overflow bug discovered during an AI-augmented security audit as well as another minor issue with unnecessarily duplicated code.

---
 .../python/{python3-gpiod_2.4.1.bb => python3-gpiod_2.4.2.bb}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-gpiod_2.4.1.bb => python3-gpiod_2.4.2.bb} (92%)
meta-python/recipes-devtools/python/python3-gpiod_2.4.2.bb renamed from meta-python/recipes-devtools/python/python3-gpiod_2.4.1.bb +1 -1
similarity index 92%
rename from meta-python/recipes-devtools/python/python3-gpiod_2.4.1.bb
rename to meta-python/recipes-devtools/python/python3-gpiod_2.4.2.bb
index 61a3fb929e..87765c2482 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4b54a1fd55a448865a0b32d41598759d"
 
 SRC_URI += "file://run-ptest"
 
-SRC_URI[sha256sum] = "d29a1e8b2a065f7ed82f00a96009bc1486fc705bb2ad25820a8ae962ec6d7688"
+SRC_URI[sha256sum] = "602aae17ff365bb8e2a30ce65c6bbf2d8e7a7e64bf016e82e4fd4c730ef69ab7"
 
 inherit python_setuptools_build_meta python_pep517 ptest pypi
 
Signature · 1 line
2.47.3