summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorSamuel Moelius <sam.moelius@trailofbits.com>2026-09-01 13:47:10 -0400
committerDavid Teigland <teigland@redhat.com>2026-09-02 09:01:51 -0500
commit953753f8ae9b9d159d48acbf7ffec40366e7b0a1 (patch)
tree34292d7b077f69df2b809e26522158afe00226cd /tools/perf/scripts/python/bin/stackcollapse-record
parent8f812a2beac33671eeb68147f3d1cea47f3652f9 (diff)
downloadlinux-953753f8ae9b9d159d48acbf7ffec40366e7b0a1.tar.gz
linux-953753f8ae9b9d159d48acbf7ffec40366e7b0a1.zip
dlm: validate userspace lock resource name length
The DLM userspace device accepts a flexible resource name after `struct dlm_write_request`. `device_write()` bounded the total write size, but did not verify that `i.lock.namelen` was covered by the bytes actually supplied by the write. A short `DLM_USER_LOCK` request can therefore claim a full `DLM_RESNAME_MAXLEN` resource name while providing no name bytes. The request path later hashes and copies the claimed name length, reading past the `memdup_user_nul()` allocation. Reject non-conversion lock requests whose claimed resource name length exceeds the flexible name payload supplied with the write. Valid lock requests with complete names are unchanged. Track the payload length before compat conversion so 32-bit requests keep using their own request header size. Assisted-by: Codex:gpt-5.5-cyber-preview Acked-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com> Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions