In the Linux kernel, the following vulnerability has been resolved:
slab: Fix too strict alignment check in create_cache()
On m68k, where the minimum alignment of unsigned long is 2 bytes:
Kernel panic - not syncing: __kmem_cache_create_args: Failed to create slab 'io_kiocb'. Error -22
CPU: 0 UID: 0 PID: 1 Comm: swapper Not tainted 6.12.0-atari-03776-g7eaa1f99261a #1783
Stack from 0102fe5c:
0102fe5c00514a2b00514a2bffffff00000000010051f5ed00425e7800514a2b0041eb74 ffffffea 000003100051f5ed ffffffea ffffffea 00601f60000000440102ff20000e7a680051ab8e004383b80051f5ed ffffffea 000000b80000000701020c0000000000000e77f00041e5f0005f67c00051f5ed000000b60102fef4000003100102fef40000000000000016005f676c0060a34c0000001000000004000000380000009a01000000000000b8005f668e0102e000000013720102ff88Call Trace:[<00425e78>]dump_stack+0xc/0x10[<0041eb74>]panic+0xd8/0x26c[<000e7a68>]__kmem_cache_create_args+0x278/0x2e8[<000e77f0>]__kmem_cache_create_args+0x0/0x2e8[<0041e5f0>]memset+0x0/0x8c[<005f67c0>]io_uring_init+0x54/0xd2
The minimal alignment of an integral type may differ from its size,
hence is not safe to assume that an arbitrary freeptr_t (which is
basically an unsigned long) is always aligned to 4 or 8 bytes.
As nothing seems to require the additional alignment, it is safe to fix
this by relaxing the check to the actual minimum alignment of freeptr_t.