summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorYunpeng Tian <shionthanatos@gmail.com>2026-08-31 17:31:16 +0200
committerJan Kara <jack@suse.cz>2026-09-01 11:04:03 +0200
commit9a2390959685ac35a58c80c8016120849a2babf6 (patch)
treeba0efd7e7b9c59fde17db4463d6b3636982c1e9e /tools/perf/scripts/python/stackcollapse.py
parenta61fb39759d719a4f4966742b4d28387e33d81c4 (diff)
downloadlinux-9a2390959685ac35a58c80c8016120849a2babf6.tar.gz
linux-9a2390959685ac35a58c80c8016120849a2babf6.zip
udf: validate the device specification EA before using it
udf_get_extendedattr() bounds an extended attribute only against struct genericFormat, which is 12 bytes. A type-12 device specification is struct deviceSpec, which is 24 bytes plus a flexible impUse array. Thus a corrupted filesystem can contain extended attribute that is accepted by udf_get_extendedattr() but udf_write_inode() or udf_read_inode() may access beyond the end of provided buffer. Provide a udf_device_spec_valid() check to validate correctness of extended attribute that is a deviceSpec. While here, check the result of udf_add_extendedattr() before dereferencing it as it can return NULL in case of error. [JK: Removed duplicated validity checks] Reported-by: Yunpeng Tian <shionthanatos@gmail.com> Reported-by: Gongming Wang <gmwgg05@gmail.com> Reported-by: Mingda Zhang <npczmd@qq.com> Reported-by: Qinrun Dai <jupmouse@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Yunpeng Tian <shionthanatos@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions