[dpdk-dev] [PATCH] net/memif: fix invalid unix domain address length

Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) jgrajcia at cisco.com
Tue Oct 22 18:35:41 CEST 2019



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: Tuesday, October 22, 2019 6:33 PM
> To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
> <jgrajcia at cisco.com>; dev at dpdk.org
> Cc: stephen at networkplumber.org
> Subject: Re: [dpdk-dev] [PATCH] net/memif: fix invalid unix domain address
> length
> 
> On 10/22/2019 5:08 PM, Jakub Grajciar wrote:
> > Define MEMIF_SOCKET_UN_SIZE to size of unix domain socket address.
> > Report error in case of longer path.
> >
> > Fixes: b923866c6974 ("net/memif: allow for full key size in socket
> > name")
> > Cc: stephen at networkplumber.org
> >
> > Signed-off-by: Jakub Grajciar <jgrajcia at cisco.com>
> 
> <...>
> 
> > +  if (strlen(filename) != MEMIF_SOCKET_UN_SIZE) {
> > +		MIF_LOG(ERR, "Unix socket address too long (max 108).");
> > +		return -1;
> > +	}
> 
> Are you sure about this check, I didn't test it but intention looks like ">=".

Thanks, I'll fix that in next version.

> 
> btw, it is possible to print 'MEMIF_SOCKET_UN_SIZE' as max value, instead of
> hardcoded '108'.


More information about the dev mailing list