Xilinx / Xilinx/embeddedsw

Xil_DCacheFlushRange() unhandled integer overflow

Open
#88 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

e.g. in embeddedsw/lib/bsp/standalone/src/arm/cortexr5/xil_cache.c

if adr+len > 2^32 (bad usage)
or adr+len == 2^32 (valid usage),
nothing will happen.

more dangerously, if (adr+len > 2^32 - cacheline) && (adr+len < 2^32) (also valid usage),
the while loop never terminates.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in embeddedsw/lib/bsp/standalone/src/arm/cortexr5/xil_cache.c at Xil_DCacheFlushRange(). Trace the address and length arithmetic and the while-loop termination for sums at and near 2^32. Done means the reported boundary cases are handled without silently doing nothing or entering a non-terminating loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.