CyberRota Analysis
AI-GeneratedAn out-of-bounds read vulnerability in the QTextCodec::codecForName() function of the Qt framework can lead to incorrect codec selection or, in severe cases, a denial of service if the function is called with a non-NUL-terminated QByteArray. This issue primarily affects applications using the Qt5Compat module from Qt 6.0.0 onward, as well as Qt Core in versions 4.x and 5.x. Developers utilizing these versions should prioritize remediation, especially if their applications handle QByteArrays that may not be properly terminated.
Original NVD Description
An out-of-bounds read (buffer over-read) vulnerability exists in QTextCodec::codecForName() in Qt. When the function is called with a QByteArray that is not NUL-terminated (for example, one created with QByteArray::fromRawData()), the codec-name matching routine reads past the end of the supplied buffer. In most cases this results in an incorrect text codec being selected; in the worst case, if the over-read reaches unmapped memory, the process crashes (denial of service). The over-read is bounded by the length of the longest codec-name candidate, and the out-of-bounds bytes are only compared internally against Qt's fixed list of codec names, so no data is disclosed to an attacker. Applications that do not pass non-NUL-terminated QByteArrays to QTextCodec::codecForName() are not exposed. The affected code resides in the Qt5Compat module from Qt 6.0.0 onward, and in Qt Core (qtbase) in Qt 4.x and Qt 5.x.