musl/src
Rich Felker 3733c831f2 fix struct layout mismatch in sound ioctl time32 fallback conversion
the snd_pcm_mmap_control struct used with SNDRV_PCM_IOCTL_SYNC_PTR was
mistakenly defined in the kernel uapi with "before u32" padding both
before and after the first u32 member. our conversion between the
modern struct and the legacy time32 struct was written without
awareness of that mistake, and assumed the time64 version of the
struct was the intended form with padding to match the layout on
64-bit archs. as a result, the struct was not converted correctly when
running on old kernels, with audio glitches as the likely result.

this was discovered thanks to a related bug in the kernel, whereby
32-bit userspace running on a 64-bit kernel also suffered from the
types mismatching. the mistaken layout is now the ABI and can't be
changed -- or at least making a new ioctl to change it would just
result in a worse situation.

our conversion here is changed to treat the snd_pcm_mmap_control
substruct as two separate substructs at locations dependent on
endianness (since the displacement depends on endianness), using the
existing conversion framework.
2021-10-19 16:07:14 -04:00
..
aio drop use of pthread_once for aio thread stack size init 2020-12-08 18:02:39 -05:00
complex fix incorrect results for catanf and catanl with some inputs 2020-02-05 09:40:11 -05:00
conf fix build regression in sysconf for archs with variable page size 2018-09-14 16:25:56 -04:00
crypt update crypt_blowfish to support $2b$ prefix 2020-10-18 12:16:55 -04:00
ctype fix wcwidth wrongly returning 0 for most of planes 4 and up 2020-01-01 20:02:51 -05:00
dirent fail fdopendir for O_PATH file descriptors 2019-02-07 12:51:02 -05:00
env fix inconsistent signature of __libc_start_main 2021-01-30 16:42:26 -05:00
errno improve strerror speed 2020-03-14 21:23:37 -04:00
exit lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
fcntl remove spurious inclusion of libc.h for LFS64 ABI aliases 2018-09-12 14:34:38 -04:00
fenv add SPE FPU support to powerpc-sf 2021-09-23 19:11:46 -04:00
include add qsort_r and make qsort a wrapper around it 2021-09-23 20:09:22 -04:00
internal lift locale lock out of internal __get_locale 2020-12-09 16:58:32 -05:00
ipc fix corrupt sysvipc timestamps on 32-bit archs with old kernels 2020-03-14 21:23:37 -04:00
ldso fix dl_iterate_phdr dlpi_tls_data reporting to match spec 2021-03-26 13:35:41 -04:00
legacy fix error return value for cuserid 2021-02-13 14:03:23 -05:00
linux make epoll_[p]wait a cancellation point 2021-04-03 21:16:41 -04:00
locale use libc-internal malloc for newlocale/freelocale 2020-12-09 17:11:05 -05:00
malloc remove return with expression in void function 2021-04-27 19:31:48 -04:00
math add SPE FPU support to powerpc-sf 2021-09-23 19:11:46 -04:00
misc fix struct layout mismatch in sound ioctl time32 fallback conversion 2021-10-19 16:07:14 -04:00
mman revert unwanted and inadvertent change that slipped into mmap.c 2019-12-20 21:27:39 -05:00
mq mq_timedsend, mq_timedreceive: add time64, decouple 32-bit time_t 2019-07-28 17:09:30 -04:00
multibyte rewrite wcsnrtombs to fix buffer overflow and other bugs 2020-11-19 17:12:43 -05:00
network fix missing newline in herror output 2020-09-03 17:30:22 -04:00
passwd nscd: fall back gracefully on kernels without AF_UNIX support 2021-04-16 10:17:42 -04:00
prng lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
process use internal malloc for posix_spawn file actions objects 2021-03-15 10:21:29 -04:00
regex fix failure of glob to match broken symlinks under some conditions 2019-08-07 02:38:45 -04:00
sched sched_rr_get_interval: don't assume time_t is 32-bit on 32-bit archs 2019-07-29 12:31:20 -04:00
search new tsearch implementation 2018-09-20 17:57:47 -04:00
select fix regression in select with no timeout 2019-08-07 02:57:53 -04:00
setjmp add SPE FPU support to powerpc-sf 2021-09-23 19:11:46 -04:00
signal fix libc-internal signal blocking on mips archs 2021-07-29 23:24:58 -04:00
stat fix remaining direct use of stat syscalls outside fstatat.c 2020-02-12 17:34:17 -05:00
stdio fix undefined behavior in getdelim via null pointer arithmetic and memcpy 2021-09-11 21:21:43 -04:00
stdlib add qsort_r and make qsort a wrapper around it 2021-09-23 20:09:22 -04:00
string fix misleading comment in strstr 2020-12-09 11:34:29 -05:00
temp remove spurious inclusion of libc.h for LFS64 ABI aliases 2018-09-12 14:34:38 -04:00
termios add tcgetwinsize and tcsetwinsize functions, move struct winsize 2020-08-24 21:31:18 -04:00
thread fix error checking in pthread_getname_np 2021-08-06 11:26:15 -04:00
time fix TZ parsing logic for identifying POSIX-form strings 2021-06-23 17:30:10 -04:00
unistd work around linux bug in readlink syscall with zero buffer size 2020-11-23 19:44:19 -05:00