]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: unpoison memory returned by epoll_pwait2()
authorMike Yuan <me@yhndnzj.com>
Sat, 24 Jan 2026 17:33:05 +0000 (18:33 +0100)
committerMike Yuan <me@yhndnzj.com>
Sat, 24 Jan 2026 17:36:24 +0000 (18:36 +0100)
Our fuzzer CI recently got bumped to Ubuntu 24.04 with
glibc >= 2.35. Apparently msan is not happy with the new
epoll_pwait2(), hence explicitly mark the memory region
as initialized.

Fixes #40455
Alternative to #40463

src/libsystemd/sd-event/sd-event.c

index bd8f4118ef860fe401a12e444dd1a8ef5a8db9a9..e46dd4d0e955ab661428174305f9e42df4b9c6f5 100644 (file)
@@ -4618,6 +4618,7 @@ static int process_epoll(sd_event *e, usec_t timeout, int64_t threshold, int64_t
                         return r;
 
                 m = (size_t) r;
+                msan_unpoison(e->event_queue, m * sizeof(struct epoll_event));
 
                 if (m < n_event_max)
                         break;