mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Kang Chen <k.chen@smail.nju.edu.cn>
Cc: "Jean-Baptiste Maneyrol" <jean-baptiste.maneyrol@tdk.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: imu: inv_mpu6050: validate the CNF0 package
Date: Tue, 3 Nov 2026 13:56:51 +0200	[thread overview]
Message-ID: <aunMA-vO-ILv86P9@ashevche-desk.local> (raw)
In-Reply-To: <20261103114146.75881-1-k.chen@smail.nju.edu.cn>

On Tue, Nov 03, 2026 at 07:41:46PM +0800, Kang Chen wrote:
> asus_acpi_get_sensor_info() walks the package returned by CNF0 and uses
> each element as a package without checking the object type or the
> element type.  A top-level string or buffer makes package.count alias
> its length and package.elements alias its data pointer.  For a
> non-package element, the inner count and elements pointer are taken
> from unrelated union members, so the driver can walk a firmware-chosen
> pointer and pass it to strscpy().
> 
> Require a top-level package and skip elements that are not packages.

acpi_evaluate_object_typed()

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-11-03 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 11:41 Kang Chen
2026-11-03 11:56 ` Andy Shevchenko [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=aunMA-vO-ILv86P9@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=k.chen@smail.nju.edu.cn \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=srinivas.pandruvada@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

all inboxes | Powered by JetHome®