aboutsummaryrefslogtreecommitdiff
path: root/packages/natd/Makefile
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2026-11-03 10:28:58 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-11-05 11:25:13 +0000
commitdbf51f8ed0a5bda749dd20aedca67ddcdfe70980 (patch)
tree268523c5c587ed6291c91ca06a2b024ee205e474 /packages/natd/Makefile
parent7806832f23fb31d28386d42692b221776c9f4ee4 (diff)
snd_envy24ht: Fix out-of-bounds DMA buffer indexingHEADmain
378e0c5c8967 reduced the number of playback channels from 5 to 1. This introduced a regression, because the global DMA buffer indexing was not adapted accordingly, which now results in kernel panics because of out-of-bounds reads into the buffer. Additionally, because of wrong indexing, recording channels ended up being serviced by the playback part of envy24ht_intr(). Register 1 recording channel instead of 2 + sc->adcn, as the recording DMA buffer only has room for 1 stereo stream. With 1 channel per direction, give each channel the first index of its direction (ENVY24HT_CHAN_PLAY_DAC1 and ENVY24HT_CHAN_REC_ADC1). While here, fix the buffer wrap in envy24ht_r16sl(). It has to be ch->size / ch->unit, but was copied verbatim from the 32-bit equivalent, whose samples are twice as large, so 16-bit recording wrapped halfway through the DMA buffer and never read the second half. Fixes: 378e0c5c8967 PR: 299952 MFC after: 1 week Sponsored by: The FreeBSD Foundation Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D61155
Diffstat (limited to 'packages/natd/Makefile')
0 files changed, 0 insertions, 0 deletions