fix(security): missing braces logic error leading to ui denial of service [MEDIUM]#839
Open
failsafesecurity wants to merge 1 commit intojitsi:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Finding: Missing Braces Logic Error leading to UI Denial of Service
Severity: MEDIUM
Reported by: FailSafe Research Team
Component:
modules/impl/gui/src/main/java/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java:437Description
In
ConferenceChatSession.java, thememberPresenceChangedmethod contains anifstatement that checks if a contact is already in thechatParticipantslist before adding it. However, theifstatement lacks curly braces, meaning only thechatParticipants.add(chatContact);line is conditionally executed. The subsequent line,sessionRenderer.addChatContact(chatContact);, is executed unconditionally for everyMEMBER_JOINEDevent. If a malicious server or user sends continuousMEMBER_JOINEDevents for the same user, the application will repeatedly add the contact to the UI renderer, consuming excessive CPU and memory.Fix
Add curly braces to the
ifstatement to ensure both the list addition and the UI rendering are conditionally executed only when the contact is not already present.This ensures the UI is only updated when a genuinely new participant joins the chat, preventing the resource exhaustion.
Proof of Concept