Investigate clientChannels[] out of bounds read/crash
Maintainer thường phản hồi trong vòng 5 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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).
- Ngôn ngữ chính
- C
- Star
- 1.1k
- Fork
- 248
- Merge trung bình
- 9 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jamulussoftware/jamulus
-
Move translation checker (and potentially other runners) to ARM runnerCó thể đã có người làm @ann0see đã nhận 27 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jamulussoftware/jamulus#3953 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
AI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jamulussoftware/jamulus#3846 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Qt6 moving towards cmakeĐang mởfeature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
jamulussoftware/jamulus#3964 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
jamulussoftware/jamulus#3961 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
jamulussoftware/jamulus#3958 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của jamulussoftware/jamulus
Issue tương tự
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add `pdfcpu` to the pantryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
tmewett/BrogueCE#929 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug : find_key() compares kty against "ocy" instead of "oct", breaking kid-less HS256 verificationĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
OpenPrinting/cups#1756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
SteamGridDB/SGDBoop#147 ·