]> git.lizzy.rs Git - plan9front.git/commit
devip: fix use after free in ipifcremmulti()
authorcinap_lenrek <cinap_lenrek@felloff.net>
Mon, 11 Jun 2018 01:19:42 +0000 (03:19 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Mon, 11 Jun 2018 01:19:42 +0000 (03:19 +0200)
commit71402b2ea15d0e2bf939b6e095ad56fa14ab2d0a
treeb851df04c4d1c040aa3fc62ce932f82d90faf99f
parent94f6f89ac1e8731a27c38b54b54348bc063fb6c3
devip: fix use after free in ipifcremmulti()

closeconv() calls ipifcremmulti() like:

while((mp = cv->multi) != nil)
ipifcremmulti(cv, mp->ma, mp->ia);

so we have to defer freeing the entry after doing:

if((lifc = iplocalonifc(ifc, ia)) != nil)
remselfcache(f, ifc, lifc, ma);

which accesses the otherwise free'd ia and ma arguments.
sys/src/9/ip/ipifc.c