Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutt dumps core #7

Open
pfuetz opened this issue Mar 7, 2022 · 2 comments
Open

Mutt dumps core #7

pfuetz opened this issue Mar 7, 2022 · 2 comments

Comments

@pfuetz
Copy link

pfuetz commented Mar 7, 2022

On Solaris-cbe, mutt dumps core, when one wants to save a message (s-key, followed by =filena) using tab-expansion, and that tab-expansion leads to more than one possible file..

It works, when there is only one file which matches the pattern…

@batrla
Copy link
Member

batrla commented Mar 7, 2022

Thanks for report, it's easy to duplicate the problem.

mutt:core> ::status
...
process terminated by SIGSEGV (Segmentation Fault) code=1 (SEGV_MAPERR), addr=78

mutt:core> <rip=p
                mutt_complete+0x506
mutt:core> <rip::dis -n1
mutt_complete+0x503:            movsbl (%rbx),%esi
mutt_complete+0x506:            movl   (%rsi),%eax
mutt_complete+0x508:            movsbl %cl,%r11d
mutt:core> <rsi=p
                0x78

The disassembly of mutt_complete() shows obvious issue at offset 0x503 and 0x506. Loading 8 bits from memory to %esi, sign extending the result and then de-referencing %rsi value as a 64 bit pointer is usually bad idea [1]. No wonder that mutt made a SIGSEGV when it executed instruction at offset 0x506 trying to do memory load from address 0x78.

Good news is that the fix to this issue is known.

[1] instruction at offset 503 is not a branch target, we could not skip it before executing next one

@batrla
Copy link
Member

batrla commented Mar 11, 2022

Fixed as 33934252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants