From: Jeff Layton <jlayton@redhat.com>
To: Tim Gardner <tim.gardner@canonical.com>
Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
linux-kernel@vger.kernel.org, Steve French <sfrench@samba.org>
Subject: Re: [PATCH 3.12-rc4] cifs: ntstatus_to_dos_map[] is not terminated
Date: Mon, 14 Oct 2013 11:38:38 -0400 [thread overview]
Message-ID: <20131014113838.4feb90f5@tlielax.poochiereds.net> (raw)
In-Reply-To: <1381692543-41226-1-git-send-email-tim.gardner@canonical.com>
On Sun, 13 Oct 2013 13:29:03 -0600
Tim Gardner <tim.gardner@canonical.com> wrote:
> Functions that walk the ntstatus_to_dos_map[] array could
> run off the end. For example, ntstatus_to_dos() loops
> while ntstatus_to_dos_map[].ntstatus is not 0. Granted,
> this is mostly theoretical, but could be used as a DOS attack
> if the error code in the SMB header is bogus.
>
> Cc: Steve French <sfrench@samba.org>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
> fs/cifs/netmisc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
> index af847e1..651a527 100644
> --- a/fs/cifs/netmisc.c
> +++ b/fs/cifs/netmisc.c
> @@ -780,7 +780,9 @@ static const struct {
> ERRDOS, ERRnoaccess, 0xc0000290}, {
> ERRDOS, ERRbadfunc, 0xc000029c}, {
> ERRDOS, ERRsymlink, NT_STATUS_STOPPED_ON_SYMLINK}, {
> - ERRDOS, ERRinvlevel, 0x007c0001}, };
> + ERRDOS, ERRinvlevel, 0x007c0001}, {
> + 0, 0, 0 }
> +};
>
> /*****************************************************************************
> Print an error message from the status code
Nice catch.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
prev parent reply other threads:[~2013-10-14 15:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-13 19:29 Tim Gardner
2013-10-14 2:25 ` Steve French
2013-10-14 15:38 ` Jeff Layton [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=20131014113838.4feb90f5@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=tim.gardner@canonical.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®