lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080508.012504.61259522.davem@davemloft.net>
Date:	Thu, 08 May 2008 01:25:04 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	dlezcano@...ibm.com
Cc:	xemul@...nvz.org, netdev@...r.kernel.org
Subject: Re: [PATCH][NETNS]: Fix arbitrary net_device-s corruptions on
 net_ns stop.

From: Daniel Lezcano <dlezcano@...ibm.com>
Date: Wed, 07 May 2008 18:12:35 +0200

> Pavel Emelyanov wrote:
> >>> +		sprintf(fb_name, "dev%d", dev->ifindex);
> >> The computed interface name can not exceed IFNAMSIZ, 3 ('dev') + 10 (max 
> >> int) + 1 ('\0'). In this case there is no risk to corrupt the stack but 
> >> may be it is more secure to change that to snprintf(fb_name, IFNAMSIZ, 
> >> "dev%d", dev->ifindex), just in case, no ?
> > 
> > But you have just noticed, that "there is no risk to corrupt the stack"!
> > What else can be "more secure" then :) ?
> 
> Just in case, for example, someone changes 'dev' by 'virtdev' or 
> something else.

I've applied Pavel's patch, but I changed it to use snprintf() to
address Daniel's concerns.

And this matches the way this is done in the rest of this file too :-)

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ