mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
This commit is contained in:
parent
2e939afd73
commit
f672277509
1 changed files with 1 additions and 1 deletions
|
@ -2461,7 +2461,7 @@ build_next (GstRTSPBuilder * builder, GstRTSPMessage * message,
|
|||
maxlen = sizeof (conn->session_id) - 1;
|
||||
/* the sessionid can have attributes marked with ;
|
||||
* Make sure we strip them */
|
||||
for (i = 0; session_id[i] != '\0'; i++) {
|
||||
for (i = 0; i < maxlen && session_id[i] != '\0'; i++) {
|
||||
if (session_id[i] == ';') {
|
||||
maxlen = i;
|
||||
/* parse timeout */
|
||||
|
|
Loading…
Reference in a new issue