Investigate clientChannels[] out of bounds read/crash
Mantenedores costumam responder em até 6 dias
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Describe the bug
INVALID_INDEX might not be checked everywhere correctly. AI found out that there could be an out of bounds read possiblity in client.cpp if calling SetRemoteChanGain:
To Reproduce
Not tested. Would probably need some server side trigger with invalid Channel ID.
Probably worth checking on the protocol level for invalid IDs.
Ox Alpha (GLM 5.3-Flash) suggested:
Guard the call site (minimal change):
if ( iChanID != INVALID_INDEX && bMuteMeInPersonalMix ) { ... }
and/or reject invalid IDs in EvaluateClientIDMes; optionally add a defensive Q_ASSERT/range check in SetRemoteChanGain/SetRemoteChanPan mirroring OnControllerInFaderLevel (client.cpp:956). Related latent gap: OnControllerInPanValue (client.cpp:965-975) lacks the bounds check its fader sibling has.
Expected behavior
No crash
AI analysis
src/protocol.cpp:1046-1063(EvaluateClientIDMes) — validates only body size (1 byte); the ID value itself (0–255) is passed through unchecked.src/client.cpp:1010-1036(CClient::OnClientIDReceived):
int iChanID = FindClientChannel ( iServerChanID, true ); // should always return channel 0
...
if ( bMuteMeInPersonalMix )
{
SetRemoteChanGain ( iChanID, 0, false ); // iChanID can be INVALID_INDEX (-1)
}
src/client.cpp:1833-1885(FindClientChannel) returnsINVALID_INDEX(-1) wheniServerChannelID < 0 || >= MAX_NUM_CHANNELSor when all 150 client channel slots are occupied.src/client.cpp:506-539(SetRemoteChanGain):&clientChannels[iId]with no bounds check →- timer inactive: OOB write at
client.cpp:535(clientChan->oldGain = clientChan->newGain = fGain;) plus OOB read ofiServerChannelIDfed toChannel.SetRemoteChanGain()(that callee is range-checked,channel.cpp:302); - timer active: OOB write at
client.cpp:522, andminGainOrPanId = -1causesOnTimerRemoteChanGainOrPan(client.cpp:546-548) to iterate from index −1 afterwards.
- timer inactive: OOB write at
clientChannelsis a fixedCClientChannel[150]member array (src/client.h:392).
Contrast with the correct pattern used 700 lines earlier: OnMuteStateHasChangedReceived checks if ( iChanID != INVALID_INDEX ) (client.cpp:340-346).
- Linguagem predominante
- C
- Estrelas
- 1.1k
- Forks
- 249
- Merge médio
- 11d 40min
- PRs com merge (30d)
- 6
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de jamulussoftware/jamulus
-
Move translation checker (and potentially other runners) to ARM runnerTalvez já em andamento @ann0see assumiu há 33 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
jamulussoftware/jamulus#3953 · 2 comentários ·
Mantenedores costumam responder em até 6 dias
-
AI
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
jamulussoftware/jamulus#3846 ·
Mantenedores costumam responder em até 6 dias
-
Qt6 moving towards cmakeAbertafeature request
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
jamulussoftware/jamulus#3964 · 3 comentários ·
Mantenedores costumam responder em até 6 dias
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 65/100
jamulussoftware/jamulus#3961 ·
Mantenedores costumam responder em até 6 dias
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 76/100
jamulussoftware/jamulus#3958 ·
Mantenedores costumam responder em até 6 dias
Todas as issues de jamulussoftware/jamulus
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 8 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia
-
native-cpu: -Wreturn-type in skainet_row_threads.c:150 (worker fn has no return)Talvez já em andamento @Doomguy-BFG9000 assumiu hoje. Abertagood first issue size:xs skill:native
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
SKaiNET-developers/SKaiNET#1358 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
I/O internal correctness medium priority rt_lib
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia