[PATCH 3/3] acl: Assert-crash if ACL identifier is invalid before writing it
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Apr 2026 12:45:00 +0000 (15:45 +0300)
committerNoah Meyerhans <noahm@debian.org>
Mon, 18 May 2026 20:03:51 +0000 (16:03 -0400)
It should have been checked earlier already.

Gbp-Pq: Name CVE-2026-40020-3.patch

src/plugins/acl/acl-backend-vfile-update.c

index 1c81a4f8fe528faf144641a858598f13c5219d79..ed523987d2a0e6fdab4d9e6b283f492239d13479 100644 (file)
@@ -119,6 +119,7 @@ vfile_write_right(string_t *dest, const struct acl_rights *right,
        if (neg) str_append_c(dest,'-');
        acl_rights_write_id(dest, right);
 
+       i_assert(acl_id_is_valid(str_c(dest)));
        if (strchr(str_c(dest), ' ') != NULL) T_BEGIN {
                /* need to escape it */
                const char *escaped = t_strdup(str_escape(str_c(dest)));