From: Doruk Tan Ozturk <doruk@0sec.ai>
To: Hans de Goede <hansg@kernel.org>,
Andy Shevchenko <andy@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Doruk Tan Ozturk <doruk@0sec.ai>
Subject: [PATCH 0/2] media: atomisp: validate user-supplied buffer sizes in two ioctl paths
Date: Fri, 26 Jun 2026 18:40:40 +0200 [thread overview]
Message-ID: <cover.1782484857.git.doruk@0sec.ai> (raw)
Two ioctls in the AtomISP staging driver size a kernel buffer from one
user-supplied field but use a *different* user-supplied field as the
copy/store length, with no cross-check, allowing a kernel heap/ISP-memory
out-of-bounds write:
1) atomisp_v4l2_framebuffer_to_css_frame(): frame allocated from
width/height/format, but hmm_store() uses arg->fmt.sizeimage.
2) atomisp_cp_dvs_6axis_config(): DVS 6-axis table allocated from the
stream grid, but copy_from_compatible() uses the user width/height
(both ISP2401 and ISP2400 paths).
Both add a bound check before the copy. Found by 0sec's autonomous
vulnerability analysis (https://0sec.ai); identified by static analysis,
not yet runtime-reproduced (Intel Atom ISP hardware required).
Doruk Tan Ozturk (2):
media: atomisp: validate sizeimage against the allocated frame in
framebuffer-to-CSS
media: atomisp: bound DVS 6-axis table dimensions to the allocated
config
.../staging/media/atomisp/pci/atomisp_cmd.c | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
--
2.43.0
next reply other threads:[~2026-06-26 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 16:40 Doruk Tan Ozturk [this message]
2026-06-26 16:40 ` [PATCH 1/2] media: atomisp: validate sizeimage against the allocated frame in framebuffer-to-CSS Doruk Tan Ozturk
2026-06-26 17:12 ` Dan Carpenter
2026-06-26 16:40 ` [PATCH 2/2] media: atomisp: bound DVS 6-axis table dimensions to the allocated config Doruk Tan Ozturk
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=cover.1782484857.git.doruk@0sec.ai \
--to=doruk@0sec.ai \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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