linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Yunlong Song <yunlong.song@huawei.com>
To: Chao Yu <yuchao0@huawei.com>,
	jaegeuk@kernel.org, chao@kernel.org, yunlong.song@icloud.com
Cc: miaoxie@huawei.com, bintian.wang@huawei.com,
	shengyong1@huawei.com, heyunlei@huawei.com,
	linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] fsck.f2fs: check and fix i_namelen to avoid double free
Date: Sat, 23 Dec 2017 11:19:48 +0800	[thread overview]
Message-ID: <1d02d383-434e-bf32-1940-ff2ef790868f@huawei.com> (raw)
In-Reply-To: <cbf1ef8f-9347-3a4c-bac7-62173544068f@huawei.com>

Double free problem:
Since ddr bit jump makes i_namelen a larger value (> 255),when file is 
not encrypted,
the convert_encrypted_name will memcpy out range of en[255], when en is 
freed, there
will be double free problem.

On 2017/12/23 11:05, Chao Yu wrote:
> On 2017/12/18 21:25, Yunlong Song wrote:
>> v1 -> v2: use child_info to pass dentry namelen
>> v2 -> v3: check child != NULL to include the F2FS_FT_ORPHAN file type
>> v3 -> v4: fix the i_namelen problem of dump.f2fs、
> There is no commit log, so what do you mean about "avoid double free"?
>
> Other than that, looks good to me.
>
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>
> Thanks,
>
>
> .
>

-- 
Thanks,
Yunlong Song

  reply	other threads:[~2017-12-23  3:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  6:25 [PATCH] fsck.f2fs: check and fix i_namelen to avoid double free Yunlong Song
2017-12-15 10:01 ` Sheng Yong
2017-12-18 11:15 ` [PATCH v2] " Yunlong Song
2017-12-18 13:10 ` [PATCH v3] " Yunlong Song
2017-12-18 13:25 ` [PATCH v4] " Yunlong Song
2017-12-23  3:05   ` Chao Yu
2017-12-23  3:19     ` Yunlong Song [this message]
2017-12-23  3:35       ` Chao Yu
2017-12-23  3:40         ` Yunlong Song

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=1d02d383-434e-bf32-1940-ff2ef790868f@huawei.com \
    --to=yunlong.song@huawei.com \
    --cc=bintian.wang@huawei.com \
    --cc=chao@kernel.org \
    --cc=heyunlei@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=shengyong1@huawei.com \
    --cc=yuchao0@huawei.com \
    --cc=yunlong.song@icloud.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;
as well as URLs for NNTP newsgroup(s).