OpenWrt Project jsonpath: Memory leak when processing strings, labels, and regexp tokens
OpenWrt Project is a Linux operating system targeting embedded devices. In versions prior to both 24.10.6 and 25.12.1, the jp_get_token function, which performs lexical analysis by breaking input expressions into tokens, contains a memory leak vulnerability when extracting string literals, field labels, and regular expressions using dynamic memory allocation. These extracted results are stored in a jp_opcode struct, which is later copied to a newly allocated jp_opcode object via jp_alloc_op. During this transfer, if a string was previously extracted and stored in the initial jp_opcode, it is copied to the new allocation but the original memory is never freed, resulting in a memory leak. This issue has been fixed in versions 24.10.6 and 25.12.1.
References
- https://github.com/openwrt/openwrt/releases/tag/v24.10.6 x_refsource_MISC
- https://github.com/openwrt/openwrt/releases/tag/v25.12.1 x_refsource_MISC
- https://github.com/openwrt/openwrt/security/advisories/GHSA-rcc6-v4r6-gj4m x_refsource_CONFIRM
Affected products
- ==< 24.10.6
- ==>= 25.12.0-rc1, < 25.12.1
Matching in nixpkgs
pkgs.terraform-providers.openwrt
None
pkgs.python312Packages.openwrt-luci-rpc
Python module for interacting with the OpenWrt Luci RPC interface
pkgs.python312Packages.openwrt-ubus-rpc
Python API for OpenWrt ubus RPC
pkgs.python313Packages.openwrt-luci-rpc
Python module for interacting with the OpenWrt Luci RPC interface
pkgs.python313Packages.openwrt-ubus-rpc
Python API for OpenWrt ubus RPC
pkgs.python314Packages.openwrt-luci-rpc
Python module for interacting with the OpenWrt Luci RPC interface
pkgs.python314Packages.openwrt-ubus-rpc
Python API for OpenWrt ubus RPC
Package maintainers
-
@matt-snider Matt Snider <matt.snider@protonmail.com>
-
@fabaff Fabian Affolter <mail@fabian-affolter.ch>