bugGNU nano - Bugs: bug #46490, segfault when nano detects file is...

 
 

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

bug #46490: segfault when nano detects file is already open and edit is declined

Submitter:  Matthew Hall <mhcptg>
Submitted:  Sat 21 Nov 2015 09:50:39 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sat 21 Nov 2015 01:47:38 PM UTC, comment #1: 

Thanks for reporting.  The cause of this segfault has already been fixed in SVN, and has been released in nano-2.4.3.  As Ubuntu Wily will probably not upgrade their nano version, please advise the maintainers to apply attached patch.

By the way, the crash is triggered by having MALLOC_* variables set in your environment.  If you unset those (maybe only for nano, with an alias), you can avoid the crash.

(file #35514)

Benno Schulenberg <bens>
Group administrator
Sat 21 Nov 2015 09:50:39 AM UTC, original submission:  

This was found using nano 2.4.2 on Ubuntu 15.10, both without and with debug symbols loaded.

1) Attempt to edit a file that is already open and receive this prompt:

File is being edited (by mhall with nano 2.4.2, PID 13368); continue?                                                                        

2) At the prompt, press N for 'No'.

3) nano segfaults with the following backtrace; the value of openfile->syntax is a corrupted pointer to 0x27c0 which is not a valid address.

Debugger Output:

main (argc=<optimized out>, argv=0x7fffffffdd98) at ../../src/nano.c:2768
2768            if (openfile->syntax->nmultis > 0)
(gdb) bt
#0  main (argc=<optimized out>, argv=0x7fffffffdd98) at ../../src/nano.c:2768
(gdb) print openfile
$1 = (openfilestruct *) 0x6642d0
(gdb) print openfile->syntax
$2 = (syntaxtype *) 0x27c0
(gdb) print *openfile->syntax
Cannot access memory at address 0x27c0

Matthew Hall <mhcptg>

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by mhcptg (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-07 bens Open/ClosedOpen Closed
    2015-11-21 bens Attached File- Added initialize-openfile-syntax.patch, #35514
        StatusNone Fixed
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code