Ticket #839 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

multiple utf-8 string vulnerabilities

Reported by: marcusoverhagen Owned by: mmlr
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version:
Cc: Blocked By:
Platform: All Blocking:

Description (last modified by mmlr) (diff)

Multiple UTF-8 functions are unsafe and vulnerable to denial of service attacks or buffer overflow attacks.

This includes:

count_utf8_bytes

UTF8CountBytes

UTF8CountChars

UTF8ToCharCode

UTF8ToLength

It is dangerous to look only at the first byte to determine how long an character sequence is. A malformed sequence can be used to skip a string's terminating zero byte.

Example (2 bytes and terminating zero):

0xE0 0x81 0x00

The first byte tells that it's 3 bytes long, and the above mentioned functions will skip the terminating zero.

Change History

Changed 2 years ago by marcusoverhagen

  • description modified (diff)
  • summary changed from mutlpile utf-8 string vulnerabilities to multiple utf-8 string vulnerabilities

Changed 2 years ago by axeld

  • owner changed from axeld to mmlr

Yes, I noticed that, too, when I fixed that byte count bug a few days ago. I'll give Michael another try :-)

Changed 2 years ago by mmlr

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

Fixed in r19624.

Note: See TracTickets for help on using tickets.