✘Use after free in commit e370c43f68ce500fb493ca170f9633e540fe24df

Gary E. Miller gem at rellim.com
Tue Nov 21 19:00:43 UTC 2017


Yo Eric!

Peng found this in your commit e370c43f68ce500fb493ca170f9633e540fe24df

Use after free????

static void
 pps_shutdown(
-       int unit,               /* unit number (not used) */
        struct refclockproc *pp /* refclock structure pointer */
        )
 {
        struct ppsunit *up;
 
-       UNUSED_ARG(unit);
-
        up = pp->unitptr;
+       free(up);
        if (up->fddev > 0)
                close(up->fddev);
-       free(up);
 }



RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20171121/b731e604/attachment.bin>


More information about the devel mailing list