Bug 26224 - iconv hangs when converting some invalid inputs from several IBM character sets
Summary: iconv hangs when converting some invalid inputs from several IBM character sets
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: locale (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Arjun Shankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-09 20:21 UTC by Arjun Shankar
Modified: 2020-07-09 20:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arjun Shankar 2020-07-09 20:21:51 UTC
I found the following hangs when running an iconv input fuzzer I wrote while trying to fix bug 19519. The hangs are present in master:

echo -en '\x00\x0f' | iconv -t UTF-8 -c -f IBM1364
echo -en '\x00\x0f' | iconv -t UTF-8 -c -f IBM1371
echo -en '\x00\x0f' | iconv -t UTF-8 -c -f IBM1388
echo -en '\x00\x0f' | iconv -t UTF-8 -c -f IBM1390
echo -en '\x00\x0f' | iconv -t UTF-8 -c -f IBM1399

These hangs are presently mentioned but commented out in iconv/tst-iconv_prog.sh and should eventually be un-commented when this bug is fixed.

The fuzzer itself (attachment 11786 [details]) should also be run against these character sets after this bug is fixed, because they skip all remaining inputs for a character set once they encounter a hang in the corresponding converter, and thus any other hangs (from possibly other bugs) aren't tested for.