bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible tgetstr() NULL pointer dereference


From: Gregory James DUCK
Subject: Possible tgetstr() NULL pointer dereference
Date: Wed, 14 Jun 2023 16:00:02 +0800

Hi,

It seems following modified/corrupted xterm-256color file (attached) seems to cause a crash in the tgetstr() function from libtinfo.so.6:

    $ cd ~
    $ mkdir -p .terminfo/x/
    $ cp xterm-256color .terminfo/x/
    $ vim

Tested on Ubuntu 23.04.  I think the corrupted file causes convert_strings() to write a NULL entry to the tp->ext_Names array.  Later, tgetstr() reads the value but assumes it is non-NULL leading to a crash (NULL pointer dereference).  It is probably unlikely that the xterm-256color file would be directly modified by an end-user though.

Cheers, -Greg.

Attachment: xterm-256color
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]