public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz•org>
To: Daniel Lezcano <dlezcano@fr•ibm.com>
Cc: David Miller <davem@davemloft•net>,
	Linux Netdev List <netdev@vger•kernel.org>
Subject: Re: [PATCH][NETNS]: Fix arbitrary net_device-s corruptions on net_ns stop.
Date: Wed, 07 May 2008 19:37:55 +0400	[thread overview]
Message-ID: <4821CCD3.5020502@openvz.org> (raw)
In-Reply-To: <4821CBE5.5090801@fr.ibm.com>

>> +		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 :) ?

Thanks,
Pavel

  reply	other threads:[~2008-05-07 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07  8:08 [PATCH][NETNS]: Fix arbitrary net_device-s corruptions on net_ns stop Pavel Emelyanov
2008-05-07 15:33 ` Daniel Lezcano
2008-05-07 15:37   ` Pavel Emelyanov [this message]
2008-05-07 16:12     ` Daniel Lezcano
2008-05-08  8:25       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4821CCD3.5020502@openvz.org \
    --to=xemul@openvz$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=dlezcano@fr$(echo .)ibm.com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox