[Midnightbsd-cvs] [MidnightBSD/src] 34ade9: initialize oifp to avoid bogus results/panics in e...
Lucas Holt
noreply at github.com
Sun Nov 15 02:00:15 EST 2020
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/src
Commit: 34ade9084c7e53ca0e3a4f2f21848d34848e7d7e
https://github.com/MidnightBSD/src/commit/34ade9084c7e53ca0e3a4f2f21848d34848e7d7e
Author: Lucas Holt <luke at foolishgames.com>
Date: 2020-11-15 (Sun, 15 Nov 2020)
Changed paths:
M sys/netinet6/mld6.c
Log Message:
-----------
initialize oifp to avoid bogus results/panics in edge cases
In certain cases (probably not during normal operation but observed in
the lab during development) ip6_ouput() could return without error
and ifpp (&oifp) not updated.
Given oifp was never initialized we would take the later branch
as oifp was not NULL, and when calling icmp6_ifstat_inc() we would
panic dereferencing a garbage pointer.
For code stability initialize oifp to NULL before first use to always
have a deterministic value and not rely on a called function to behave
and always and for ever do the work for us as we hope for.
More information about the Midnightbsd-cvs
mailing list