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

 
 

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

Submitted by:  Matthew Hall <mhcptg>
Submitted on:  Sat 21 Nov 2015 09:50:39 AM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Updated the item)
  • -unavailable- added by mhcptg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Dec 2015 03:18:13 PM UTCbensOpen/ClosedOpen=>Closed
    Sat 21 Nov 2015 01:47:38 PM UTCbensAttached File-=>Added initialize-openfile-syntax.patch, #35514
      StatusNone=>Fixed
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1