From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amdgpu,radeon: fix integer overflow in pitch alignment
Date: Sun, 12 Apr 2026 14:15:40 +1000 [thread overview]
Message-ID: <review-overall-20260406225008.2787532-1-werner@verivus.com> (raw)
In-Reply-To: <20260406225008.2787532-1-werner@verivus.com>
Overall Series Review
Subject: drm/amdgpu,radeon: fix integer overflow in pitch alignment
Author: Werner Kasselman <werner@verivus.ai>
Patches: 3
Reviewed: 2026-04-12T14:15:40.221211
---
This is a well-motivated 2-patch series fixing a real integer overflow vulnerability in the pitch alignment functions of both the amdgpu and radeon DRM drivers. The bug allows an unprivileged local user to create a zero-size GEM buffer object via `DRM_IOCTL_MODE_CREATE_DUMB`, which could lead to out-of-bounds memory access.
The root cause analysis is correct: `drm_mode_create_dumb()` validates `cpp * width` fits in u32 *before* calling the driver, but both `amdgpu_gem_align_pitch()` and `radeon_align_pitch()` round up `width` by up to 255 pixels, which can push the subsequent `aligned * cpp` multiplication past `INT_MAX`, causing signed integer overflow (undefined behavior in C) that wraps to 0. The patches are minimal, correct, and appropriate for stable backport.
One minor series-level observation: the `Signed-off-by` uses `werner@verivus.com` while the `From:` header shows `werner@verivus.ai` -- this domain mismatch may need clarification for the DCO.
The commit messages correctly note that the long-term fix is converting to `drm_mode_size_dumb()`, making these targeted stopgap fixes appropriate.
---
---
Generated by Claude Code Patch Reviewer
prev parent 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 review: " Claude Code Review Bot
2026-04-12 4:15 ` Claude Code Review Bot [this message]
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-overall-20260406225008.2787532-1-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