bugGNU gettext - Bugs: bug #64422, Exit handler vulnerability

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #64422: Exit handler vulnerability

Submitter:  Hiroshi Yoshikawa <kitanokitsune>
Submitted:  Thu 13 Jul 2023 11:15:16 AM UTC
   
 
Category:  Other Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Thu 13 Jul 2023 02:04:09 PM UTC, comment #1: 


> This handler calls exit() in itself.


In the source code (gnulib/lib/closeout.c), you can see that it calls _exit(), not exit().

> Indeed, in my environment (mingw-w64 on Windows), that causes stack overflow and app crash.


Please be more precise. Which of the programs, part of gettext, crashes, and under which conditions? I need a precise "how to reproduce" recipe.

Also, how did you build GNU gettext? As described in INSTALL.windows, or not?

Bruno Haible <haible>
Group administrator
Thu 13 Jul 2023 11:15:16 AM UTC, original submission:  

The function close_stdout(), which is an exit handler registerd with atexit(), terminates abnormally.
This handler calls exit() in itself.

As mentioned in the following article, exit handlers must terminate by return, not exit().
https://wiki.sei.cmu.edu/confluence/display/c/ENV32-C.+All+exit+handlers+must+return+normally

Indeed, in my environment (mingw-w64 on Windows), that causes stack overflow and app crash.

Hiroshi Yoshikawa <kitanokitsune>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by kitanokitsune (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-27 haible CategoryNone Other
        StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2023-07-13 haible StatusNone Need Info
        Assigned toNone haible

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code