public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Adrian Hunter <adrian.hunter@nokia.com>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: does "block: add secure discard" cause an overflow?
Date: Fri, 3 Sep 2010 11:16:32 +0200	[thread overview]
Message-ID: <20100903091631.GI5437@bicker> (raw)

This is the commit 8d57a98ccd0b44 "block: add secure discard".

The patch adds a letter 'E' to the string in blk_fill_rwbs().
        if (rw & REQ_SECURE)
                rwbs[i++] = 'E';

The problem is that "rwbs" is a 6 character buffer and if all the flags
are set the we'd get "WABSME" which would put us off the end (when you
add the NUL terminator).

regards,
dan carpenter

             reply	other threads:[~2010-09-03  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  9:16 Dan Carpenter [this message]
2010-09-04  6:41 ` does "block: add secure discard" cause an overflow? Adrian Hunter

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=20100903091631.GI5437@bicker \
    --to=error27@gmail.com \
    --cc=adrian.hunter@nokia.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox