mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Paul Menage <pmenage@ensim.com>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com, alan@redhat.com
Subject: Re: [PATCH] Inode quota allocation loophole (2.4)
Date: Wed, 13 Jun 2001 01:00:17 +0200	[thread overview]
Message-ID: <20010613010017.B28910@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <E159jIv-0004W5-00@pmenage-dt.ensim.com>
In-Reply-To: <E159jIv-0004W5-00@pmenage-dt.ensim.com>; from pmenage@ensim.com on Tue, Jun 12, 2001 at 01:13:36AM -0700

  Hello,

> Currently, dquot_initialize() is a no-op if the inode being initialized
> isn't a regular file, directory or symlink. This means that calling
> DQUOT_ALLOC_INODE() on a named pipe or AF_UNIX socket has no effect (the
> same applies to devices, but this is less likely to be a problem as
> random users can't create them); as a result a user can exhaust the
> filesystem's inodes even when they have a quota limit. This problem is
> exploitable in 2.2.19 and 2.4.2, and appears to be present in all kernel
> versions that I've looked at.
> 
> I presume that the reason for not putting quotas on pipes and sockets is
> that it's slightly more efficient not to do so. If that's the case, then
> the simplest solution would be to remove the checks in fs/dquot.c (patch
> below for 2.4.5 - patch for 2.2 in following email). Are there any
> undesirable consequences to pipes, sockets and devices having non-NULL
> pointers in i_dquot[]?
  I must admit that I don't know why we don't count quotas also for device/pipe/socket
inodes. This behaviour was there for ages :). Maybe it's time to change it.
I can't think of any problems which can be with it... Your patch seems to be fine.

								Honza
--
Jan Kara <jack@suse.cz>
SuSE Labs

      reply	other threads:[~2001-06-12 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-12  8:13 Paul Menage
2001-06-12 23:00 ` Jan Kara [this message]

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=20010613010017.B28910@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmenage@ensim.com \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®