Merged
Conversation
added 3 commits
April 20, 2026 20:36
sb.pos, sb.pos_num and sb.count must stay coherent.
Fix the few corner case where sb.pos_num can be greater than sb.count
Which can cause a heap overvlow in set_selection like this:
==1236==ERROR: AddressSanitizer: heap-use-after-free on address 0x7cad23ff0058 at pc 0x7f4d26389bb0 bp 0x7ffee6280cc0 sp 0x7ffee6280cb0
READ of size 8 at 0x7cad23ff0058 thread T0
#0 0x7f4d26389baf in selection_set ../libtsm/src/tsm/tsm-selection.c:78
kmscon#1 0x7f4d263a1754 in tsm_screen_selection_start ../libtsm/src/tsm/tsm-selection.c:242
kmscon#2 0x5559ccbbdfb2 in start_selection
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Check that sb.pos_num and sb.pos stays coherent during the robustness test. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Add screen resize in the scrollback count and pos_num test Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
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.
sb.pos, sb.pos_num and sb.count must stay coherent.
Fix the few corner case where sb.pos_num can be greater than sb.count.
Fix: kmscon/kmscon#330