summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorZichen Xie <zichenxie0106@gmail.com>2024-10-21 22:54:45 +0300
committerMikulas Patocka <mpatocka@redhat.com>2024-11-04 19:34:56 +0300
commit5a4510c762fc04c74cff264cd4d9e9f5bf364bae (patch)
tree66b8543b0a76a43a06cdedc73667029e04233b9d /scripts/gdb/linux/utils.py
parentfed13a5478680614ba97fc87e71f16e2e197912e (diff)
downloadlinux-5a4510c762fc04c74cff264cd4d9e9f5bf364bae.tar.xz
dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow
This was found by a static analyzer. There may be a potential integer overflow issue in unstripe_ctr(). uc->unstripe_offset and uc->unstripe_width are defined as "sector_t"(uint64_t), while uc->unstripe, uc->chunk_size and uc->stripes are all defined as "uint32_t". The result of the calculation will be limited to "uint32_t" without correct casting. So, we recommend adding an extra cast to prevent potential integer overflow. Fixes: 18a5bf270532 ("dm: add unstriped target") Signed-off-by: Zichen Xie <zichenxie0106@gmail.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions