In session_process_msg() recheck the validity of the rbuf before moving
authorclaudio <claudio@openbsd.org>
Thu, 25 May 2023 14:20:25 +0000 (14:20 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 25 May 2023 14:20:25 +0000 (14:20 +0000)
commit7515d867e80ac38daab3c4c8a25d13cf8a3033c6
treecfd88398c46cc32ced07c86695fe1f068a2a14f9
parent31d17708df44d0b0ed0584e3f62112678fbf2f49
In session_process_msg() recheck the validity of the rbuf before moving
the remaining data around.

There is an improbable case where a NOTIFICATION is received while also
reaching the MSG_PROCESS_LIMIT. In this case rbuf is NULL when breaking
out of the for loop and hitting this code.

sthen@ is the (un)lucky person to hit that improbable case
OK tb@ sthen@
usr.sbin/bgpd/session.c