main inclusion report for chmlib

Bug #236113 reported by Jonathan Riddell
10
Affects Status Importance Assigned to Milestone
chmlib (Ubuntu)
Invalid
Undecided
Unassigned
Revision history for this message
Martin Pitt (pitti) wrote :

Despite the original MIR, chmlib has had quite a few vulns in the past, and due to its handling of HTML and integration into browsers it makes quite a nice attack vector. Kees, Jamie, can you please give this a deeper security review and an opinion about the general sanity of chmlib? Thanks!

Changed in chmlib:
status: New → Incomplete
assignee: nobody → ubuntu-security
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Initial review shows several problems:
* chm_http.c doesn't check return value of fgets()
* chm_http.c and lzx.c doesn't check return values of malloc (possible null pointer dereference)
* extract_chmLib.c uses stat() resulting in TOCTOU (time of check/time of use) vulnerability (specifically possibility of directory symlink attacks)
* chm_lib.c has unsigned int assignment to signed int (line 1353)
* chm_lib.c doesn't always check for cmpLen < 0, which causes read/pread to be called with negative length (logic error, probably not exploitable)
* chm_lib.c doesn't check return values of read/pread

I could continue reviewing, but after spending the time with the code I did, I don't have a lot of confidence in it.

Matthias Klose (doko)
Changed in chmlib:
assignee: ubuntu-security → nobody
Revision history for this message
Kartik Mistry (kartik.mistry) wrote :

Can we have detailed review, so that upstream can fix it?

Revision history for this message
Duane Hinnen (duanedesign) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Kees Cook (kees)
Changed in chmlib (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.