Skip to content

libgpiod: assortment of fixes

Bartosz Golaszewski linux-gpio 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20260407-treewide-fixes-e400ba546454

Versions newest first

  1. v1 Latest14 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14bindings: python: fix heap-buffer overflow bugs on setting/getting valuesbindings/python/gpiod/ext/request.c bindings/python/tests/tests_line_request.py+34 -00 replies
2/14bindings: python: remove duplicated edge detection settingbindings/python/gpiod/ext/line-settings.c+0 -40 replies
3/14core: fix 1-byte buffer over-read bugs in gpiod_chip_info_from_uapi()lib/chip-info.c+3 -30 replies
4/14core: fix parameter type in gpiod_line_mask_test_bit()lib/internal.c lib/internal.h+2 -20 replies
5/14core: store debounce_period_us with correct typelib/line-settings.c+1 -10 replies
6/14core: check the value of num_lines returned by the kernellib/line-request.c+5 -00 replies
7/14tools: reject "u" as period unit specifiertools/gpio-tools-test.bash tools/tools-common.c+13 -00 replies
8/14tools: fix an integer overflow bug in parse_period()tools/tools-common.c+2 -20 replies
9/14tools: gpionotify: fix memory leak on every event readtools/gpionotify.c+4 -10 replies
10/14tools: gpionotify: add the missing return value check for calloc()tools/gpionotify.c+1 -10 replies
11/14tools: gpionotify: free pollfds on exit()tools/gpionotify.c+1 -00 replies
12/14tools: gpionotify: don't leak info returned by gpiod_chip_watch_line_info()tools/gpionotify.c+8 -40 replies
13/14tools: gpioinfo: use correct function to free the resolvertools/gpioinfo.c+1 -10 replies
14/14dbus: manager: use the correct loop counter in error pathdbus/manager/daemon.c+1 -10 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVincent Fazio
SeriesT-b R-b T-b R-b
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH libgpiod 00/14] libgpiod: assortment of fixes

This series fixes a number of bugs reported to my by a person going by 4fqr <[email protected]>. The report seems to have been generated at least in part with the help from some kind of an AI agent, however the person behind it is almost certainly a human (these are indeed weird times if I need to say things like that...).

This includes some urgent security fixes in python bindings and a slew of changes addressing less severe bugs.

While fixing the reported bugs, I also uncovered several other issues and included them here.

---
Bartosz Golaszewski (14):
bindings: python: fix heap-buffer overflow bugs on setting/getting values
bindings: python: remove duplicated edge detection setting
core: fix 1-byte buffer over-read bugs in gpiod_chip_info_from_uapi()
core: fix parameter type in gpiod_line_mask_test_bit()
core: store debounce_period_us with correct type
core: check the value of num_lines returned by the kernel
tools: reject "u" as period unit specifier
tools: fix an integer overflow bug in parse_period()
tools: gpionotify: fix memory leak on every event read
tools: gpionotify: add the missing return value check for calloc()
tools: gpionotify: free pollfds on exit()
tools: gpionotify: don't leak info returned by gpiod_chip_watch_line_info()
tools: gpioinfo: use correct function to free the resolver
dbus: manager: use the correct loop counter in error path

 bindings/python/gpiod/ext/line-settings.c   |  4 ----
 bindings/python/gpiod/ext/request.c         | 12 ++++++++++++
 bindings/python/tests/tests_line_request.py | 22 ++++++++++++++++++++++
 dbus/manager/daemon.c                       |  2 +-
 lib/chip-info.c                             |  6 +++---
 lib/internal.c                              |  2 +-
 lib/internal.h                              |  2 +-
 lib/line-request.c                          |  5 +++++
 lib/line-settings.c                         |  2 +-
 tools/gpio-tools-test.bash                  | 11 +++++++++++
 tools/gpioinfo.c                            |  2 +-
 tools/gpionotify.c                          | 20 ++++++++++++++------
 tools/tools-common.c                        |  6 ++++--
 13 files changed, 76 insertions(+), 20 deletions(-)

---
base-commit: 530fa7823b12f91cf64bc1a9b755857049d5c2e5
change-id: 20260407-treewide-fixes-e400ba546454

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>