1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00

network: fix use-after-free

If the lifetime of the route is already expired, do not try to
configure it.

Fixes a use-after-free, as the Request object is already freed, thus, we
cannot use Route or Link stored in Request object.
This commit is contained in:
Yu Watanabe 2022-10-03 12:35:29 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 2ff7862bf2
commit 0a8720c7f0

View File

@ -1382,6 +1382,8 @@ static int route_process_request(Request *req, Link *link, Route *route) {
}
else
route_cancel_requesting(route);
return 1;
}
r = route_configure(route, sec, link, req);