From: "Aurélien Aptel" <aaptel@suse.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Steve French <sfrench@samba.org>,
linux-cifs@vger.kernel.org, Ronnie Sahlberg <lsahlber@redhat.com>,
Jianhong Yin <jiyin@redhat.com>,
Pavel Shilovsky <pshilov@microsoft.com>,
Shirish Pargaonkar <shirishpargaonkar@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] cifs: Fix slab-out-of-bounds in send_set_info() on SMB2 ACE setting
Date: Thu, 05 Jul 2018 18:05:27 +0200 [thread overview]
Message-ID: <87a7r57jnc.fsf@suse.com> (raw)
In-Reply-To: <20180705165858.7679fc44@epycfail>
Stefano Brivio <sbrivio@redhat.com> writes:
> I think it does: for SMB2_SET_INFO we'll allocate with cifs_buf_get(),
> which does:
>
> ret_buf = mempool_alloc(cifs_req_poolp, GFP_NOFS);
>
> and release with cifs_buf_release():
>
> mempool_free(buf_to_free, cifs_req_poolp);
>
> am I missing something?
I was just reading the diff and assumed it was all in the same function
nevermind, you're right.
Fix is correct but I don't like having packet specific code in the init
function.
We could also raise the small buf mempool slab size to take into account
the SETINFO with ACL so that it fits in a small buf.
It would be interesting to know the max size of a SETINFO for ACL for
that.
Meanwhile this is good enough as far as I'm concerned (if anyone has
other ideas feel free to comment).
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2018-07-05 16:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 9:46 [PATCH] cifs: Fix slab-out-of-bounds in send_set_info() on SMB2 ACE setting Stefano Brivio
2018-07-05 14:35 ` Aurélien Aptel
2018-07-05 14:55 ` Steve French
2018-07-05 16:00 ` Stefano Brivio
2018-07-05 17:11 ` Aurélien Aptel
2018-07-05 14:58 ` Stefano Brivio
2018-07-05 16:05 ` Aurélien Aptel [this message]
2018-07-05 17:53 ` 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=87a7r57jnc.fsf@suse.com \
--to=aaptel@suse.com \
--cc=jiyin@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=lsahlber@redhat.com \
--cc=pshilov@microsoft.com \
--cc=sbrivio@redhat.com \
--cc=sfrench@samba.org \
--cc=shirishpargaonkar@gmail.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).