Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica/dist/namespace avoid dereferencing a...
details: https://anonhg.NetBSD.org/src/rev/acb716a1c641
branches: trunk
changeset: 983622:acb716a1c641
user: chs <chs%NetBSD.org@localhost>
date: Sun May 30 16:25:35 2021 +0000
description:
avoid dereferencing a constant string address as a UINT32 pointer,
KUBSAN complains about bad alignment.
Reported-by: syzbot+91187f4e33436ce83e56%syzkaller.appspotmail.com@localhost
diffstat:
sys/external/bsd/acpica/dist/namespace/nsaccess.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r bc9e5022dd21 -r acb716a1c641 sys/external/bsd/acpica/dist/namespace/nsaccess.c
--- a/sys/external/bsd/acpica/dist/namespace/nsaccess.c Sun May 30 14:06:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsaccess.c Sun May 30 16:25:35 2021 +0000
@@ -79,6 +79,7 @@
ACPI_NAMESPACE_NODE *PrevNode = NULL;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STRING Val = NULL;
+ UINT32 Name;
ACPI_FUNCTION_TRACE (NsRootInitialize);
@@ -143,7 +144,8 @@
* predefined names are at the root level. It is much easier to
* just create and link the new node(s) here.
*/
- NewNode = AcpiNsCreateNode (*ACPI_CAST_PTR (UINT32, InitVal->Name));
+ memcpy(&Name, InitVal->Name, sizeof(Name));
+ NewNode = AcpiNsCreateNode (Name);
if (!NewNode)
{
Status = AE_NO_MEMORY;
Home |
Main Index |
Thread Index |
Old Index