Quoting S.Çağlar Onur (cag...@10ur.org):
> Hi,
> 
> 
> On Mon, Oct 21, 2013 at 8:30 PM, Serge Hallyn <serge.hal...@ubuntu.com>wrote:
> 
> > Quoting S.Çağlar Onur (cag...@10ur.org):
> > > The addrlen parameter should be the actual length of socket's name for
> > abstract sockets. Otherwise socket gets padded with NULLs.
> > >
> > > cat /proc/net/unix | grep lxc
> > > [...]
> > > 0000000000000000: 00000003 00000000 00000000 0001 03 226548
> > @lxc/ad055575fe28ddd5//var/lib/lxc^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
> > > [...]
> > >
> > > with this patch;
> > >
> > > cat /proc/net/unix | grep lxc
> > > [...]
> > > 0000000000000000: 00000002 00000000 00010000 0001 01 109563
> > @lxc/ad055575fe28ddd5//var/lib/lxc
> > > [...]
> >
> > Yeah I've noticed that too :)  However, you can't just take the length
> > of the passed-in string, you need to make sure it's no larger
> > than sizeof(addr.sun_path)-1.  Is that being guaranteed somewhere else
> > that I'm glossing over?
> 
> 
> Hmm I think current code path also lacks that check. As long as I see we
> only control the length in lxc_af_unix_open for non-abstract case. I'll add
> the checks and iterate one more time sometime this week.

Thanks!

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to