From: Bjoern Doebel <doebel@amazon.de>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Bjoern Doebel <doebel@amazon.de>, <linux-cifs@vger.kernel.org>,
<pc@manguebit.org>, <ronniesahlberg@gmail.com>,
<sprasad@microsoft.com>, <tom@talpey.com>,
<bharathsm@microsoft.com>, <samba-technical@lists.samba.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] smb: client: fix heap overflow in DACL owner/group rewrite
Date: Mon, 7 Sep 2026 17:59:23 +0000 [thread overview]
Message-ID: <ap77V8bEpMjSvdOj@amazon.de> (raw)
In-Reply-To: <CAKYAXd8r-zvLH6Ecxu33jDAjM_6Uv2KFS4Naa-tYFHAwntgreQ@mail.gmail.com>
Hi Namjae,
On Sat, Sep 05, 2026 at 10:15:37AM +0900, Namjae Jeon wrote:
> > @@ -1815,11 +1815,13 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
> > cifs_put_tlink(tlink);
> > return rc;
> > }
> > - if (mode_from_sid)
> > - nsecdesclen +=
> > - le16_to_cpu(dacl_ptr->num_aces) * sizeof(struct smb_ace);
> > - else /* cifsacl */
> > - nsecdesclen += le16_to_cpu(dacl_ptr->size);
> > + /*
> > + * Worst case: every ACE is rewritten with a new SID of
> > + * SID_MAX_SUB_AUTHORITIES sub-auths -> sizeof(smb_ace) each,
> > + * plus the smb_acl header replace_sids_and_copy_aces() emits.
> Since you mentioned replace_sids_and_copy_aces(), please check whether
> replace_sids_and_copy_aces() also has a potential overflow issue.
That looks sensible. I'll send a followup v3 (the original patch also
needs an update to the Fixes: tag, as you point out.)
Bjoern
next prev parent reply other threads:[~2026-09-07 17:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 15:54 [PATCH] smb: client: fix DACL-rewrite heap overflow in id_mode_to_cifs_acl() Bjoern Doebel
2026-07-09 22:15 ` Steve French
2026-07-10 6:37 ` Bjoern Doebel
2026-09-04 12:58 ` [PATCH] smb: client: fix heap overflow in DACL owner/group rewrite Bjoern Doebel
2026-09-05 1:15 ` Namjae Jeon
2026-09-07 17:59 ` Bjoern Doebel [this message]
2026-09-08 16:09 ` [PATCH v3 0/2] smb: client: fix DACL rewrite overflows Bjoern Doebel
2026-09-08 16:10 ` [PATCH v3 1/2] smb: client: fix heap overflow in DACL owner/group rewrite Bjoern Doebel
2026-09-08 16:10 ` [PATCH v3 2/2] smb: client: fail DACL rewrite when the new DACL exceeds 64K Bjoern Doebel
2026-09-09 2:55 ` Namjae Jeon
2026-09-09 17:15 ` [PATCH v3 0/2] smb: client: fix DACL rewrite overflows Paulo Alcantara
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=ap77V8bEpMjSvdOj@amazon.de \
--to=doebel@amazon.de \
--cc=bharathsm@microsoft.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sprasad@microsoft.com \
--cc=stable@vger.kernel.org \
--cc=tom@talpey.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