From: HyeongJun An <sammiee5311@gmail.com>
To: tianchu.chen@linux.dev
Cc: broonie@kernel.org, baolin.wang@linux.alibaba.com,
zhang.lyra@gmail.com, linux-sound@vger.kernel.org,
HyeongJun An <sammiee5311@gmail.com>
Subject: Re: [PATCH] ASoC: sprd: validate compress buffer sizes against fixed allocations
Date: Tue, 1 Sep 2026 23:07:07 +0900 [thread overview]
Message-ID: <20260901140707.1516083-1-sammiee5311@gmail.com> (raw)
In-Reply-To: <4386bc53631b052c1866a91061715b009d98b04f@linux.dev>
On Mon, Aug 31, 2026 at 03:13:36PM +0000, Tianchu Chen wrote:
> + if (params->buffer.fragment_size > SPRD_COMPR_IRAM_BUF_SIZE ||
> + (u64)params->buffer.fragment_size * params->buffer.fragments >
> + SPRD_COMPR_AREA_BUF_SIZE)
> + return -EINVAL;
I walked the copy path. Stage 0 writes fragment_size in total and no
more, so '>' against the 32K data area is exact. '>=' would reject the
32K the comment there calls usual.
Worth saying the overflow is reachable with the driver's own advertised
caps, not just a hostile value. get_caps reports max_fragment_size 128K
and the core never enforces it.
Reviewed-by: HyeongJun An <sammiee5311@gmail.com>
prev parent reply other threads:[~2026-09-01 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 15:13 [PATCH] ASoC: sprd: validate compress buffer sizes against fixed allocations Tianchu Chen
2026-08-31 21:40 ` Mark Brown
2026-09-01 14:07 ` HyeongJun An [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=20260901140707.1516083-1-sammiee5311@gmail.com \
--to=sammiee5311@gmail.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=tianchu.chen@linux.dev \
--cc=zhang.lyra@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.