ubusd: fix ACL check for receiving events

Wildcard event match must also be subject to ACL checks

Reported-by: Karsten Sperling <ksperling@apple.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2025-10-17 11:15:26 +00:00
parent aa4a7ee1d3
commit 60e04048a0

View File

@@ -93,7 +93,7 @@ static int ubusd_alloc_event_pattern(struct ubus_client *cl, struct blob_attr *m
len--;
}
if (pattern[0] && ubusd_acl_check(cl, pattern, NULL, UBUS_ACL_LISTEN))
if (ubusd_acl_check(cl, pattern, NULL, UBUS_ACL_LISTEN))
return UBUS_STATUS_PERMISSION_DENIED;
ev = calloc(1, sizeof(*ev) + len + 1);