From: Bryam Vargas <hexlabsecurity@proton.me>
To: Joseph Qi <joseph.qi@linux.alibaba.com>,
Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>
Cc: ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Kurt Hackel <kurt.hackel@oracle.com>
Subject: Re: [PATCH 0/2] ocfs2/dlm: bound peer-controlled lengths in the o2dlm receive path
Date: Thu, 02 Jul 2026 09:27:21 +0000 [thread overview]
Message-ID: <20260702092714.303785-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <18449469-291f-4f39-be62-faec1513645a@linux.alibaba.com>
On Thu, 2 Jul 2026 13:56:00 +0800, Joseph Qi wrote:
> Ocfs2 is always deployed in trusted network, so how to trigger this
> issue in real environment?
Agreed on the precondition: there's no local trigger, and a random host off the
cluster can't reach this. The sender has to be a node the cluster's o2net layer
accepts, so it isn't remote-unauthenticated.
The real-environment trigger isn't a malicious admin. It's a single compromised
member: code execution on one node via any unrelated flaw, or a node wrongly
admitted to the interconnect. o2net admits senders by node configuration, not by
any secret -- so "trusted network" is the whole boundary. From that one foothold
you can corrupt the kernel heap of, or panic, every other node in the domain.
Node B's kernel integrity shouldn't depend on node A never being compromised.
> IMO, the patches are reasonable as a belt hardening against future bugs
> or operational accidents, but not overstate the risk by framing it as a
> security vulnerability.
The DLM already treats these wire fields as untrusted, so this isn't a belt
against a hypothetical. The lock-operation handlers reject an oversized name the
moment they read it:
dlm_master_request_handler fs/ocfs2/dlm/dlmmaster.c:1426
dlm_create_lock_handler fs/ocfs2/dlm/dlmlock.c:469
dlm_convert_lock_handler fs/ocfs2/dlm/dlmconvert.c:450
dlm_unlock_lock_handler fs/ocfs2/dlm/dlmunlock.c:416
same namelen > DLM_LOCKID_NAME_MAX test in all four. dlm_migrate_request_handler
and dlm_mig_lockres_handler take the identical u8 field into the identical
32-byte buffer and skip it. The patches just make them consistent with the rest
of the receive path. Here the sender's u8 length (up to 255) reaches the 32-byte
slab buffer with no bound, and the sender controls the copied bytes too. That's
a heap OOB write.
The framing is your call as maintainer, and the fix is identical either way. If
ocfs2's position is that a joined member is inside the trust boundary, I won't
argue the CVE -- but these two are attacker-length-and-content-controlled heap
OOB writes, which is why I didn't post them as robustness-only. Either way I'd
like the bound to land.
Thanks for the review,
Bryam
prev parent reply other threads:[~2026-07-02 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 5:01 Bryam Vargas via B4 Relay
2026-06-29 5:01 ` [PATCH 1/2] ocfs2: bound namelen in dlm_migrate_request_handler Bryam Vargas via B4 Relay
2026-07-02 11:03 ` Joseph Qi
2026-06-29 5:01 ` [PATCH 2/2] ocfs2: validate lengths in dlm_mig_lockres_handler Bryam Vargas via B4 Relay
2026-07-02 11:05 ` Joseph Qi
2026-07-02 5:56 ` [PATCH 0/2] ocfs2/dlm: bound peer-controlled lengths in the o2dlm receive path Joseph Qi
2026-07-02 9:27 ` Bryam Vargas [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=20260702092714.303785-1-hexlabsecurity@proton.me \
--to=hexlabsecurity@proton.me \
--cc=akpm@linux-foundation.org \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=kurt.hackel@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
/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®