lkml.org 
[lkml]   [2014]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.11 091/182] nfsd4: buffer-length check for SUPPATTR_EXCLCREAT
    Date
    3.11.10.9 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: "J. Bruce Fields" <bfields@redhat.com>

    commit de3997a7eeb9ea286b15879fdf8a95aae065b4f7 upstream.

    This was an omission from 8c18f2052e756e7d5dea712fc6e7ed70c00e8a39
    "nfsd41: SUPPATTR_EXCLCREAT attribute".

    Cc: Benny Halevy <bhalevy@primarydata.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    fs/nfsd/nfs4xdr.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
    index c6c727a13..7b87337 100644
    --- a/fs/nfsd/nfs4xdr.c
    +++ b/fs/nfsd/nfs4xdr.c
    @@ -2500,6 +2500,8 @@ out_acl:
    goto out;
    }
    if (bmval2 & FATTR4_WORD2_SUPPATTR_EXCLCREAT) {
    + if ((buflen -= 16) < 0)
    + goto out_resource;
    WRITE32(3);
    WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD0);
    WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD1);
    --
    1.9.1


    \
     
     \ /
      Last update: 2014-04-26 04:01    [W:2.575 / U:2.800 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site