Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/5] cifs: check for bytes_remaining going to zero in CIFS_SessSetup
Date: Tue, 26 Apr 2011 15:11:33 +0100	[thread overview]
Message-ID: <17452.1303827093@redhat.com> (raw)
In-Reply-To: <1303819401-14789-3-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

> It's possible that when we go to decode the string area in the
> SESSION_SETUP response, that bytes_remaining will be 0. Decrementing it at
> that point will mean that it can go "negative" and wrap. Check for a
> bytes_remaining value of 0, and don't try to decode the string area if
> that's the case.
> 
> Cc: stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
> Reported-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Acked-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

  parent reply	other threads:[~2011-04-26 14:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 12:03 [PATCH 0/5] cifs: fix some bounds checking problems Jeff Layton
     [not found] ` <1303819401-14789-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 12:03   ` [PATCH 1/5] cifs: change bleft in decode_unicode_ssetup back to signed type Jeff Layton
2011-04-26 12:03   ` [PATCH 2/5] cifs: check for bytes_remaining going to zero in CIFS_SessSetup Jeff Layton
2011-04-26 12:03   ` [PATCH 3/5] cifs: sanitize length checking in coalesce_t2 Jeff Layton
2011-04-26 12:03   ` [PATCH 4/5] cifs: refactor mid finding loop in cifs_demultiplex_thread Jeff Layton
2011-04-26 12:03   ` [PATCH 5/5] cifs: handle errors from coalesce_t2 Jeff Layton
2011-04-27 14:17   ` [PATCH 0/5] cifs: fix some bounds checking problems Jeff Layton
     [not found]     ` <20110427101740.32be5c28-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-04-27 14:59       ` Steve French
     [not found]         ` <BANLkTiko7K1HJFjAKfRokmFiWk=+rHe0DA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-27 15:04           ` Jeff Layton
     [not found]             ` <20110427110404.71b80c29-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-04-27 15:06               ` Steve French
     [not found]                 ` <BANLkTinzFc5DgUuG9ohRQNGk12PDO7J-uQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-27 15:07                   ` Steve French
     [not found]                     ` <BANLkTikLYQg_zEWS5Joz=7eTj1P_YF6ZzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-27 15:14                       ` Jeff Layton
2011-04-29  5:05   ` Steve French
     [not found]     ` <BANLkTimNseyrXc9ZDz0N4tomRx1oy5P60Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-29 10:55       ` Jeff Layton
     [not found] ` <1303819401-14789-2-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 14:10   ` [PATCH 1/5] cifs: change bleft in decode_unicode_ssetup back to signed type David Howells
     [not found] ` <1303819401-14789-3-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 14:11   ` David Howells [this message]
     [not found] ` <1303819401-14789-4-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 14:27   ` [PATCH 3/5] cifs: sanitize length checking in coalesce_t2 David Howells
     [not found]     ` <17747.1303828052-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 16:00       ` Jeff Layton
2011-04-27 12:03       ` [PATCH 3/5] cifs: sanitize length checking in coalesce_t2 (try #2) Jeff Layton
     [not found]     ` <1303905796-28087-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-27 16:37       ` David Howells
     [not found]         ` <13543.1303922232-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-27 16:43           ` Jeff Layton
2011-04-27 16:43           ` David Howells
2011-04-27 17:31           ` [PATCH] cifs: sanitize length checking in coalesce_t2 (try #3) Jeff Layton
     [not found] ` <1303819401-14789-6-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 14:40   ` [PATCH 5/5] cifs: handle errors from coalesce_t2 David Howells
     [not found] ` <1303819401-14789-5-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-04-26 14:39   ` [PATCH 4/5] cifs: refactor mid finding loop in cifs_demultiplex_thread David Howells
2011-05-03  3:44   ` Steve French
     [not found]     ` <BANLkTim4jXoQm47-ecw8r5ftBVGRbA+mKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-03 12:09       ` Jeff Layton
     [not found]         ` <20110503080953.65db9af6-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-05-03 14:50           ` Steve French

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=17452.1303827093@redhat.com \
    --to=dhowells-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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