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] [thread-next>] [day] [month] [year] [list]
Message-ID: <408ad037-639a-4051-831b-b663c0d2d772@zetier.com>
Date: Wed, 1 Oct 2025 12:34:16 -0400
From: Ethan Ferguson <ethan.ferguson@...ier.com>
To: "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>
Cc: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "cpgs@...sung.com" <cpgs@...sung.com>,
 "linkinjeon@...nel.org" <linkinjeon@...nel.org>,
 "sj1557.seo@...sung.com" <sj1557.seo@...sung.com>
Subject: Re: [PATCH v7 1/1] exfat: Add support for FS_IOC_{GET,SET}FSLABEL

Hi,

On 9/28/25 06:28, Yuezhang.Mo@...y.com wrote:
> On Fri, Sep 12, 2025 11:26 Ethan Ferguson <ethan.ferguson@...ier.com> wrote:
>> +int exfat_read_volume_label(struct super_block *sb, struct exfat_uni_name *label_out)
>> +{
>> +       int ret, i;
>> +       struct exfat_sb_info *sbi = EXFAT_SB(sb);
>> +       struct exfat_entry_set_cache es;
>> +       struct exfat_dentry *ep;
>> +
>> +       mutex_lock(&sbi->s_lock);
>> +
>> +       memset(label_out, 0, sizeof(*label_out));
>> +       ret = exfat_get_volume_label_dentry(sb, &es);
>> +       if (ret < 0) {
>> +               /*
>> +                * ENOENT signifies that a volume label dentry doesn't exist
>> +                * We will treat this as an empty volume label and not fail.
>> +                */
>> +               if (ret == -ENOENT)
>> +                       ret = 0;
>> +
>> +               goto unlock;
>> +       }
>> +
>> +       ep = exfat_get_dentry_cached(&es, 0);
>> +       label_out->name_len = ep->dentry.volume_label.char_count;
>> +       if (label_out->name_len > EXFAT_VOLUME_LABEL_LEN) {
>> +               ret = -EIO;
>> +               goto unlock;
>> +       }
>> +
>> +       for (i = 0; i < label_out->name_len; i++)
>> +               label_out->name[i] = le16_to_cpu(ep->dentry.volume_label.volume_label[i]);
>> +
>> +unlock:
>> +       mutex_unlock(&sbi->s_lock);
>> +       return ret;
>> +}
> 
> Hi Ethan Ferguson,
> 
> This function has a buffer leak due to a missed call to
> exfat_put_dentry_set(). Please fix it.
> 
> Thanks
Apologies that I missed that, I would be more than happy to submit a fixed patch for this,
but I checked the dev branch of the exfat tree and noticed some lines were added to fix this
problem in my commit. If true, this is fine by me, and I will sign off on it, but I just
want to make sure that's true, because if so then I don't think another patch by me is needed.

Thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ