From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
Sukrut Bellary <sukrut.bellary@linux.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH 1/1] misc: fastrpc: Fix double free of 'buf' in error path
Date: Tue, 3 Sep 2024 11:46:31 +0100 [thread overview]
Message-ID: <7ffb8938-bd3b-45b0-a7fe-733ea9646ed8@linaro.org> (raw)
In-Reply-To: <2024090311-foam-pouncing-fcdd@gregkh>
On 03/09/2024 11:19, Greg KH wrote:
> On Mon, Sep 02, 2024 at 03:14:09PM +0100, srinivas.kandagatla@linaro.org wrote:
>> From: Sukrut Bellary <sukrut.bellary@linux.com>
>>
>> smatch warning:
>> drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf'
>>
>> In fastrpc_req_mmap() error path, the fastrpc buffer is freed in
>> fastrpc_req_munmap_impl() if unmap is successful.
>>
>> But in the end, there is an unconditional call to fastrpc_buf_free().
>> So the above case triggers the double free of fastrpc buf.
>>
>> Fixes: 72fa6f7820c4 ("misc: fastrpc: Rework fastrpc_req_munmap")
>> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
>> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
>> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> Signed-off-by: Sukrut Bellary <sukrut.bellary@linux.com>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>> drivers/misc/fastrpc.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> Any reason you forgot a cc: stable@ on this?
>
I think it was forgotten.
> I'll go add it by hand...
Thanks for doing this.
--srini
>
prev parent reply other threads:[~2024-09-03 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 14:14 [PATCH 0/1] misc: fastrpc: fixes for 6.11 srinivas.kandagatla
2024-09-02 14:14 ` [PATCH 1/1] misc: fastrpc: Fix double free of 'buf' in error path srinivas.kandagatla
2024-09-03 10:19 ` Greg KH
2024-09-03 10:46 ` Srinivas Kandagatla [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=7ffb8938-bd3b-45b0-a7fe-733ea9646ed8@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=sukrut.bellary@linux.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®