diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile index ed155af02f..8ae1b91c1f 100644 --- a/package/utils/ucode/Makefile +++ b/package/utils/ucode/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 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-07-18 +PKG_SOURCE_VERSION:=3f64c8089bf3ea4847c96b91df09fbfcaec19e1d +PKG_MIRROR_HASH:=55fbff7c527e1fadbda2e038636f39419649841ee63a5f3cdb50b9714b13420c PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch b/package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch deleted file mode 100644 index 70b6a99be7..0000000000 --- a/package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Felix Fietkau -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 ---- - ---- 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 * diff --git a/package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch b/package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch deleted file mode 100644 index 142595a5bd..0000000000 --- a/package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Felix Fietkau -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 ---- - ---- 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