[konsole] [Bug 494205] New: Crash when sending OSC 4 (RGB) color outside 256 color table
Luis Bocanegra
bugzilla_noreply at kde.org
Sun Oct 6 12:17:40 BST 2024
https://bugs.kde.org/show_bug.cgi?id=494205
Bug ID: 494205
Summary: Crash when sending OSC 4 (RGB) color outside 256 color
table
Classification: Applications
Product: konsole
Version: master
Platform: Other
OS: Linux
Status: REPORTED
Severity: crash
Priority: NOR
Component: emulation
Assignee: konsole-devel at kde.org
Reporter: luisbocanegra17b at gmail.com
Target Milestone: ---
SUMMARY
When setting OSC 4 (RGB) color through escape sequences there doesn't seem to
be a check against out 256 color range. Leading to a crash if some external
software does this, a known example is pywal that has some special escape codes
for some terminal emulators but without a way to check which terminal is a tty
running on (that I know off) they have to send the same escape codes to all of
them. While konsole handles its own color palette it still accepts those codes.
STEPS TO REPRODUCE
1. Put ']4;257;#ff0000\]' in a file and cat it (running it through echo
doesn't seem to work (don't know why) for this so reading from a file/script
that contains the following command is needed.
echo -n ']4;257;#ff0000\]' >"$(tty)"
2. Close the Konsole tab/split/window
OBSERVED RESULT
Konsole will crash instead of gracefully ending the session
EXPECTED RESULT
Konsole should not crash due to rogue escape sequences
BACKTRACE
I was unable to get a longer one
Thread 1 "konsole" received signal SIGSEGV, Segmentation fault.
QImage::~QImage (this=<optimized out>, this=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/gui/image/qimage.cpp:1061
1061 if (d && !d->ref.deref())
(gdb) c
Continuing.
KCrash: Application 'konsole' crashing... crashRecursionCounter = 2
Thread 1 "konsole" received signal SIGSEGV, Segmentation fault.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo at entry=11,
no_tid=no_tid at entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO
(ret) : 0;
(gdb) c
Continuing.
Couldn't get registers: No such process.
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.3
Kernel Version: 6.11.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
ADDITIONAL INFORMATION
Setting it to -1 instead also crashes but this time right away instead when
closing the session.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list