bugGNU Mailutils - Bugs: bug #60937, mail(1) processing escape...

 
 

bug #60937: mail(1) processing escape sequences in bodies non-interactively

Submitted by:  Hank Leininger <hlein>
Submitted on:  Sun 18 Jul 2021 10:30:42 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Sergey Poznyakoff <gray>
Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 21 Jul 2021 09:37:26 AM UTC, comment #3: 

Yes, within a couple of weeks, when I finish incorporating other changes.

Sergey Poznyakoff <gray>
Project AdministratorIn charge of this item.
Wed 21 Jul 2021 04:50:33 AM UTC, comment #2: 

comment #1:

> Fixed in 4befcfd015256c568121653038accbd84820198f. Thank you.


Thanks! Are there any plans to make a release?

I ask because it makes it a lot easier to distribute fixes downstream (Gentoo for us) and we're keen because of the security impact here.

Sam James <thesamesam>
Mon 19 Jul 2021 08:32:22 AM UTC, comment #1: 

Fixed in 4befcfd015256c568121653038accbd84820198f. Thank you.

Sergey Poznyakoff <gray>
Project AdministratorIn charge of this item.
Sun 18 Jul 2021 10:30:42 PM UTC, original submission:  

mail(1) processes escape sequences in message bodies unless given -E 'set escape'. This is fine for interactive use, but non-interactively it seems like nothing but a bad surprise.

This creates a vulnerability any time some content under an attacker's control is piped to mailutils' mail, unless that -E option is added. Other mail(1) implementations have disabled escape sequences in non-interactive mode since at least ~2002, for instance:

https://salsa.debian.org/debian/bsd-mailx/-/blob/50e29dfc5573ee2f03d814b7ae186dc3cc50a7da/collect.c#L161

A recent example of such mailutils behavior leading to an RCE vulnerability is https://github.com/fail2ban/fail2ban/security/advisories/GHSA-m985-3f3v-cwmm

fail2ban is treating that as a bug in their software, but it's a mailutils-specific bug, and a mailutils-specific fix, which breaks for any other mail(1) that doesn't use -E the same way.

Hank Leininger <hlein>

 

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

Attach Files:
   
   
Comment:
   

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 thesamesam (Posted a comment)
  • -email is unavailable- added by gray (Posted a comment)
  • -email is unavailable- added by hlein (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-19 gray StatusNone => Fixed
        Assigned toNone => gray
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.7