linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Shuai Xue <xueshuai@linux.alibaba.com>,
	linux-efi@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/2] apei/ghes: don't OOPS with bad ARM error CPER records
Date: Fri, 19 Dec 2025 11:49:58 +0100	[thread overview]
Message-ID: <cover.1766140788.git.mchehab+huawei@kernel.org> (raw)

Current parsing logic at apei/ghes for ARM Processor Error
assumes that the record sizes are correct. Yet, a bad BIOS
might produce malformed GHES reports.

Worse than that, it may end exposing data from other memory
addresses, as the logic may end dumping large portions of
the memory.

Avoid that by checking the buffer sizes where needed.

---

v3:
  - addressed Shuai feedback;
  - moved all ghes code to one patch;
  - fixed a typo and a bad indent;
  - cleanup the size check logic at ghes.c.

Mauro Carvalho Chehab (2):
  apei/ghes: ARM processor Error: don't go past allocated memory
  efi/cper: don't go past the ARM processor CPER record buffer

 drivers/acpi/apei/ghes.c        | 33 +++++++++++++++++++++++++++++----
 drivers/firmware/efi/cper-arm.c | 12 ++++++++----
 drivers/firmware/efi/cper.c     |  3 ++-
 drivers/ras/ras.c               |  6 +++++-
 include/linux/cper.h            |  3 ++-
 5 files changed, 46 insertions(+), 11 deletions(-)

-- 
2.52.0



             reply	other threads:[~2025-12-19 10:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 10:49 Mauro Carvalho Chehab [this message]
2025-12-19 10:40 ` [PATCH v3 2/2] efi/cper: don't go past the ARM processor CPER record buffer Mauro Carvalho Chehab
2025-12-19 10:50   ` Mauro Carvalho Chehab
2025-12-22 11:36   ` Jonathan Cameron
2025-12-19 10:49 ` [PATCH v3 1/2] apei/ghes: ARM processor Error: don't go past allocated memory Mauro Carvalho Chehab
2025-12-22 11:38   ` Jonathan Cameron
2025-12-22 13:53     ` Mauro Carvalho Chehab

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.1766140788.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=xueshuai@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).