[New-bugs-announce] [issue36515] unaligned memory access in the _sha3 extension

Matthias Klose report at bugs.python.org
Wed Apr 3 01:41:19 EDT 2019


New submission from Matthias Klose <doko at debian.org>:

This was seen when running an armhf binary on a 64bit kernel. The problem is that the implementation uses unaligned memory accesses, and even is well aware of that. The module allows misaligned memory accesses by default. The NO_MISALIGNED_ACCESSES macro is never defined.  Now you can define it only on architectures where unaligned memory accesses are not allowed (ARM32 on 64bit kernels), or where there are performance penalties (AArch64), or just don't try to outsmart modern compilers and always define this macro.

The attached patch only fixes the issue on ARM32 and AArch64, however the safe fix should be to always define the macro.

----------
components: Extension Modules
files: arm-alignment.diff
keywords: patch
messages: 339379
nosy: christian.heimes, doko
priority: high
severity: normal
status: open
title: unaligned memory access in the _sha3 extension
type: crash
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48243/arm-alignment.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36515>
_______________________________________


More information about the New-bugs-announce mailing list