CVE-2025-21785: arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array

JIRA: https://issues.redhat.com/browse/RHEL-81669
CVE: CVE-2025-21785

commit 875d742cf5327c93cba1f11e12b08d3cce7a88d2
Author: Radu Rendec <rrendec@redhat.com>
Date:   Thu Feb 6 12:44:20 2025 -0500

    arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array
    
    The loop that detects/populates cache information already has a bounds
    check on the array size but does not account for cache levels with
    separate data/instructions cache. Fix this by incrementing the index
    for any populated leaf (instead of any populated level).
    
    Fixes: 5d425c186537 ("arm64: kernel: add support for cpu cache information")
    
    Signed-off-by: Radu Rendec <rrendec@redhat.com>
    Link: https://lore.kernel.org/r/20250206174420.2178724-1-rrendec@redhat.com
    Signed-off-by: Will Deacon <will@kernel.org>```

Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>

---

<small>Created 2025-02-28 03:40 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small>

Merge request reports

Loading