[GIT PULL V7] Library/Android/JNI improvements

David Woodhouse dwmw2 at infradead.org
Tue Jan 14 07:03:20 EST 2014


On Mon, 2014-01-13 at 08:16 -0800, Kevin Cernekee wrote:
> On Mon, Jan 13, 2014 at 6:07 AM, David Woodhouse <dwmw2 at infradead.org> wrote:
> > On Sun, 2014-01-12 at 21:43 -0800, Kevin Cernekee wrote:
> >>    library: Export VPN configuration info to callers
> >
> > In this patch, don't we have a potential use-after-free if a CSTP
> > reconnect happens? We throw away the existing set of options and parse a
> > new set...
> 
> The existing code (main.c, jni.c) parses the options before calling
> openconnect_mainloop() and then never touches them again, so it's
> safe.  But if a caller keeps the pointers around and happens to use
> them after a reconnect, that would be a problem.

Or if a caller happens to call it while the mainloop is running.

As long as we make that explicitly forbidden (and perhaps even make it
return an error so it *never* works), I think we're OK.


-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140114/fd49cc27/attachment.bin>


More information about the openconnect-devel mailing list