diff options
| author | Joseph Qi <joseph.qi@linux.alibaba.com> | 2026-09-01 13:47:11 -0400 |
|---|---|---|
| committer | David Teigland <teigland@redhat.com> | 2026-09-02 09:01:51 -0500 |
| commit | d785f7d92f197b72d496bbcf54a160cd54f00263 (patch) | |
| tree | 3bff7246d4665132c128b24f5e3423d55ce26183 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 953753f8ae9b9d159d48acbf7ffec40366e7b0a1 (diff) | |
| download | linux-d785f7d92f197b72d496bbcf54a160cd54f00263.tar.gz linux-d785f7d92f197b72d496bbcf54a160cd54f00263.zip | |
dlm: fix buffer overflow from negative len in dlm_search_rsb_tree
commit 080e5563f878c ("dlm: validate length in dlm_search_rsb_tree")
only checks for len > DLM_RESNAME_MAXLEN, which does not catch negative
values. While the input 'len' can be negative and a negative int passed
to memcpy() is implicitly converted to a large size_t, causing a stack
buffer overflow on the key[] array.
Fix this by changing the 'len' parameter type from int to unsigned int.
This ensures negative values from callers are implicitly converted to
large unsigned values that are caught by the existing
len > DLM_RESNAME_MAXLEN check.
Acked-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
