]> 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)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Feb 2026 20:05:57 +0000 (20:05 +0000)
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

(cherry picked from commit 21ebcb5814431fad1d2e805a040ed19776f4c35b)
(cherry picked from commit a8eb2370c8a0cad89ac1b4f82f2f6b13b3a9b8dd)
(cherry picked from commit 91eb7641d3ea92a00157184978461be14f5939f2)

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

index f5a38b31d16b8bee3f09e717b3ccc920d89ab5cd..85383c4161716ec3b004f616976aeb8efbf0ad9e 100644 (file)
@@ -4640,6 +4640,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;