All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Warner Losh <imp@bsdimp.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Use of PATH_MAX
Date: Fri, 16 May 2008 09:35:17 -0500	[thread overview]
Message-ID: <482D9BA5.20607@codemonkey.ws> (raw)
In-Reply-To: <20080516.080940.74651723.imp@bsdimp.com>

Warner Losh wrote:
> From: Anthony Liguori <anthony@codemonkey.ws>
> Subject: Re: [Qemu-devel] Use of PATH_MAX
> Date: Fri, 16 May 2008 09:00:39 -0500
>
> As is the use of dynamic buffers.  If you don't always test system
> call return value, you can get odd new failures.  If you don't provide
> a sane upper bound, then you get DoS attacks...
>   

Guests don't provide filenames so no, there is no DoS attack.  As long 
as you handle allocation failures gracefully, it's fine.

The problem with static buffers is that we silently truncate filenames.  
At best, this means something that should work, won't.  At worst, this 
means that instead of opening the file you meant to open, you'll open a 
file that you didn't mean to open and overwrite the data.

Regards,

Anthony Liguori

> Warner
>   

  reply	other threads:[~2008-05-16 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 13:35 [Qemu-devel] Use of PATH_MAX Ian Jackson
2008-05-16 14:00 ` Anthony Liguori
2008-05-16 14:09   ` Warner Losh
2008-05-16 14:35     ` Anthony Liguori [this message]
2008-05-16 14:52       ` Ian Jackson
2008-05-16 14:02 ` Paul Brook
2008-05-16 14:21   ` Ian Jackson
2008-05-16 14:24     ` Ian Jackson
2008-05-16 14:32       ` Anthony Liguori
2008-05-16 14:46         ` Ian Jackson

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=482D9BA5.20607@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=imp@bsdimp.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.