Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/external/cddl/osnet/dist/common/nvpair



Module Name:    src
Committed By:   kamil
Date:           Mon Mar  2 15:45:33 UTC 2020

Modified Files:
        src/external/cddl/osnet/dist/common/nvpair: nvpair.c

Log Message:
Fix undefined behavior in misaligned pointer usage

Detected by UBSan and already fixed upstream.

Cherry-pick:
>From aa0218d6a12814fac50b287214f9f3b0b99e11b1 Mon Sep 17 00:00:00 2001
From: Brian Behlendorf <behlendorf1%llnl.gov@localhost>
Date: Tue, 7 Jan 2014 23:24:37 +0100
Subject: [PATCH] Fix nvlist 'Bus Error' for Sparc

The mis-aligned memory accesses in nvpair_native_embedded() and
nvpair_native_embedded_array() will cause a 'Bus Error' for
architectures such as Sparc which not fully byte addressible.
To avoid this issue care is taken to avoid dereferencing the
potentially mis-aligned packed nvlist_t.

Signed-off-by: Brian Behlendorf <behlendorf1%llnl.gov@localhost>
Signed-off-by: Ned Bass <bass6%llnl.gov@localhost>
Signed-off-by: marku89 <mar42%kola.li@localhost>
Issue #1700


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dist/common/nvpair/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index