Re: [PATCH] ocfs2/dlm: validate message payload length in query handlers

From: Junrui Luo

Date: Wed Mar 18 2026 - 01:18:21 EST


On Tue, Mar 17, 2026 at 08:22:08PM +0800, Joseph Qi wrote:
> OCFS2 is always deployed in trusted network.
> So if not considering defensive programming, how does it happen in real
> environment?

I agree that OCFS2 clusters are typically deployed in trusted
networks, and this is not about a malicious attacker scenario.
It won't happen under normal operation.

There is a similar pattern in fs/dlm/midcomms.c:

if (len < sizeof(struct dlm_message)) {

I was wondering if it would make sense to add a similar check in
OCFS2 as well?

Thanks,
Junrui Luo