diff options
| author | Samuel Moelius <sam.moelius@trailofbits.com> | 2026-09-01 13:47:10 -0400 |
|---|---|---|
| committer | David Teigland <teigland@redhat.com> | 2026-09-02 09:01:51 -0500 |
| commit | 953753f8ae9b9d159d48acbf7ffec40366e7b0a1 (patch) | |
| tree | 34292d7b077f69df2b809e26522158afe00226cd /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | 8f812a2beac33671eeb68147f3d1cea47f3652f9 (diff) | |
| download | linux-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/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
