Bug 1413890 (CVE-2017-5356) - CVE-2017-5356 irssi: Out-of-bounds read in format string
Summary: CVE-2017-5356 irssi: Out-of-bounds read in format string
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2017-5356
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1410829 1410830
Blocks: 1410833
TreeView+ depends on / blocked
 
Reported: 2017-01-17 09:12 UTC by Andrej Nemec
Modified: 2021-02-17 02:46 UTC (History)
4 users (show)

Fixed In Version: irssi 0.8.21, irssi 1.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-28 16:30:54 UTC


Attachments (Terms of Use)

Description Andrej Nemec 2017-01-17 09:12:32 UTC
A vulnerability was found in irssi. Printing the value %[ leads to out-of-bounds read.

CVE assignment:

http://seclists.org/oss-sec/2017/q1/77

Comment 1 Andrej Nemec 2017-01-17 09:14:15 UTC
Created irssi tracking bugs for this issue:

Affects: fedora-all [bug 1410829]
Affects: epel-5 [bug 1410830]

Comment 2 Cedric Buissart 2017-02-27 13:31:51 UTC
Corresponding patch for CVE-2017-5356 :
---8<---
--- a/src/fe-common/core/formats.c   2010-04-03 18:19:24.000000000 +0200
+++ b/src/fe-common/core/formats.c   2017-02-24 16:53:56.663978694 +0100
@@ -68,7 +68,7 @@ static void format_expand_code(const cha

        if (flags == NULL) {
                /* flags are being ignored - skip the code */
-               while (**format != ']')
+               while (**format != ']' && **format != '\0')
                        (*format)++;
                return;
        }
@@ -161,6 +161,10 @@ int format_expand_styles(GString *out, c
        case '[':
                /* code */
                format_expand_code(format, out, flags);
+               if ((*format)[0] == '\0')
+                       /* oops, reached end prematurely */
+                       (*format)--;
+               
                break;
        default:
                /* check if it's a background color */
--->8---

Comment 4 Cedric Buissart 2017-02-28 16:29:56 UTC
Lowering the impact to low : the attacker would need to trick user into loading a maliciously crafted theme, or running a malicious command in order to crash irssi.

Comment 5 Cedric Buissart 2017-02-28 16:31:04 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.


Note You need to log in before you can comment on or make changes to this bug.