public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/radeon: fix integer overflow in radeon_align_pitch()
Date: Sun, 12 Apr 2026 14:15:40 +1000	[thread overview]
Message-ID: <review-patch2-20260406225008.2787532-3-werner@verivus.com> (raw)
In-Reply-To: <20260406225008.2787532-3-werner@verivus.com>

Patch Review

**Same fix, same analysis.** The radeon variant is structurally identical:

```c
/* Guard against integer overflow in aligned * cpp. */
if (aligned > INT_MAX / (cpp ? cpp : 1) || aligned <= 0)
    return 0;
```

And the caller checks:
```c
if (!args->pitch)
    return -EINVAL;
...
if (!args->size)
    return -EINVAL;
```

The only functional difference is that `radeon_align_pitch()` has slightly different alignment masks (e.g., `pitch_mask = align_large ? 255 : 127` for cpp=1) which doesn't change the overflow risk.

**Fixes tag:** Points to `ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)")` which originally introduced `radeon_mode_dumb_create()`. This is correct -- the vulnerability has existed since the function was first written.

**Same redundancy note** about `!args->size` applies here as well.

**Verdict: Looks correct. Same quality as patch 1.**

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-12  4:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06 22:50 [PATCH 0/2] drm/amdgpu,radeon: fix integer overflow in pitch alignment Werner Kasselman
2026-04-06 22:50 ` [PATCH 1/2] drm/amdgpu: fix integer overflow in amdgpu_gem_align_pitch() Werner Kasselman
2026-04-12  4:15   ` Claude review: " Claude Code Review Bot
2026-04-06 22:50 ` [PATCH 2/2] drm/radeon: fix integer overflow in radeon_align_pitch() Werner Kasselman
2026-04-12  4:15   ` Claude Code Review Bot [this message]
2026-04-12  4:15 ` Claude review: drm/amdgpu,radeon: fix integer overflow in pitch alignment Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch2-20260406225008.2787532-3-werner@verivus.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox