lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFX2Jfn75a8XENoqvztVnUe0aR9S2KGjpcGp3zyLeFS-h--9ag@mail.gmail.com>
Date:   Wed, 15 Jul 2020 12:40:18 -0400
From:   Anna Schumaker <anna.schumaker@...app.com>
To:     Colin Ian King <colin.king@...onical.com>
Cc:     Trond Myklebust <trond.myklebust@...merspace.com>,
        "J . Bruce Fields" <bfields@...ldses.org>,
        Chuck Lever <chuck.lever@...cle.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xprtrdma: fix incorrect header size calcations

No need for a v2, I can fix it up!


On Wed, Jul 15, 2020 at 12:32 PM Colin Ian King
<colin.king@...onical.com> wrote:
>
> Bah, $SUBJECT typo "calcations" -> "calculations". can that be fixed up
> when it's applied, or shall I send a V2?
>
> On 15/07/2020 17:26, Colin King wrote:
> > From: Colin Ian King <colin.king@...onical.com>
> >
> > Currently the header size calculations are using an assignment
> > operator instead of a += operator when accumulating the header
> > size leading to incorrect sizes.  Fix this by using the correct
> > operator.
> >
> > Addresses-Coverity: ("Unused value")
> > Fixes: 302d3deb2068 ("xprtrdma: Prevent inline overflow")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
> > ---
> >  net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
> > index 935bbef2f7be..453bacc99907 100644
> > --- a/net/sunrpc/xprtrdma/rpc_rdma.c
> > +++ b/net/sunrpc/xprtrdma/rpc_rdma.c
> > @@ -71,7 +71,7 @@ static unsigned int rpcrdma_max_call_header_size(unsigned int maxsegs)
> >       size = RPCRDMA_HDRLEN_MIN;
> >
> >       /* Maximum Read list size */
> > -     size = maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
> > +     size += maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
> >
> >       /* Minimal Read chunk size */
> >       size += sizeof(__be32); /* segment count */
> > @@ -94,7 +94,7 @@ static unsigned int rpcrdma_max_reply_header_size(unsigned int maxsegs)
> >       size = RPCRDMA_HDRLEN_MIN;
> >
> >       /* Maximum Write list size */
> > -     size = sizeof(__be32);          /* segment count */
> > +     size += sizeof(__be32);         /* segment count */
> >       size += maxsegs * rpcrdma_segment_maxsz * sizeof(__be32);
> >       size += sizeof(__be32); /* list discriminator */
> >
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ