54b00e3b1fa9 ubus: fix double registry clear on disconnect
69521b55855c ubus: fix use-after-free on deferred request reply() method
22e8c16d9deb debug: fix crash when passing tagged string to getinfo()
2c9eea5174d6 ubus: use ucv_resource_create_ex for connections/channels
0a4cf4b7e71a ubus: use ucv_resource_create_ex for for ubus.request resources
99ee75a69cd3 ubus: use ucv_resource_create_ex for ubus.deferred resources
f085a42b977f ubus: use ucv_resource_create_ex for objects
94ad17d13a0d ubus: use ucv_resource_create_ex for ubus.notify resources
a3fa47fdda3e ubus: use ucv_resource_create_ex for ubus.listener resources
9ab5fa869dec ubus: use ucv_resource_create_ex for ubus.subscriber resources
be92ebd70633 CI: debian: install cmake package
fd202fd40bd1 socket: respect port argument in sockinst.connect()
767c209b917b socket: properly handle async `connect(2)` errors in socket.connect()
37ac8f112af6 socket: improve port argument validation in sockinst.connect()
Fixes: https://github.com/jow-/ucode/issues/302
Fixes: https://github.com/jow-/ucode/issues/303
Signed-off-by: Felix Fietkau <nbd@nbd.name>
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
-PKG_SOURCE_DATE:=2025-05-11
-PKG_SOURCE_VERSION:=d5b3a9dc1091dd28cf6f0f60cd34fc322ef27717
-PKG_MIRROR_HASH:=cd8af9d5ac28e2530b56015a3f2fcf6f36062546cac8b23a5f7b75b367209b54
+PKG_SOURCE_DATE:=2025-06-09
+PKG_SOURCE_VERSION:=37ac8f112af63e64c1ea2d13ae63c134b62a5681
+PKG_MIRROR_HASH:=f98b1d75be427e2540d5b8320834efde738899b41a0390f3af13ab56c660b7fb
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC
+++ /dev/null
-From: Felix Fietkau <nbd@nbd.name>
-Date: Fri, 9 May 2025 11:57:57 +0200
-Subject: [PATCH] ubus: fix double registry clear on disconnect
-
-Set c->registry_index to -1 in order to ensure that the resource free path
-does not clobber registry items of unrelated connections.
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/lib/ubus.c
-+++ b/lib/ubus.c
-@@ -2375,8 +2375,11 @@ uc_ubus_channel_disconnect_cb(struct ubu
- c->ctx.sock.fd = -1;
- }
-
-- if (c->registry_index >= 0)
-- connection_reg_clear(c->vm, c->registry_index);
-+ if (c->registry_index >= 0) {
-+ int idx = c->registry_index;
-+ c->registry_index = -1;
-+ connection_reg_clear(c->vm, idx);
-+ }
- }
-
- static uc_value_t *
+++ /dev/null
-From: Felix Fietkau <nbd@nbd.name>
-Date: Mon, 12 May 2025 12:43:44 +0200
-Subject: [PATCH] ubus: fix use-after-free on deferred request reply() method
-
-Hold a reference to the defer resource as long as it is still needed
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/lib/ubus.c
-+++ b/lib/ubus.c
-@@ -636,6 +636,7 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t
- uc_value_t *this, *func;
-
- request_reg_get(defer->vm, defer->registry_index, &this, &func, NULL, NULL);
-+ ucv_get(this);
-
- if (ucv_is_callable(func)) {
- uc_vm_stack_push(defer->vm, ucv_get(this));
-@@ -648,6 +649,7 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t
- }
-
- request_reg_clear(defer->vm, defer->registry_index);
-+ ucv_put(this);
- }
-
- static void