Bug 17535 - lha new security issue CVE-2016-1925
Summary: lha new security issue CVE-2016-1925
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL: http://lwn.net/Vulnerabilities/684749/
Whiteboard: has_procedure advisory MGA5-32-OK MGA...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-01-19 18:36 CET by David Walser
Modified: 2016-04-22 18:34 CEST (History)
4 users (show)

See Also:
Source RPM: lha-1.14i-26.mga5.src.rpm
CVE:
Status comment:


Attachments
lha example (1.76 KB, text/plain)
2016-04-16 19:30 CEST, William Kenney
Details

Description David Walser 2016-01-19 18:36:05 CET
A CVE was assigned for a buffer overflow fixed upstream in lha:
http://openwall.com/lists/oss-security/2016/01/18/8

The upstream fix is here:
https://osdn.jp/projects/lha/scm/git/lha/commits/bf2471f59ecc1aa45645d967bc9fa0efa3de3556

Our lha is probably affected, but the code is quite different, so the fix would need to be rewritten.

Reproducible: 

Steps to Reproduce:
David Walser 2016-01-19 18:36:12 CET

Whiteboard: (none) => MGA5TOO

Comment 1 Samuel Verschelde 2016-02-23 14:26:38 CET
Assigning to packagers collectively with the registered maintainer in CC. If working on it, please assign the bug report to yourself.

Assignee: bugsquad => pkg-bugs

Comment 2 Nicolas Salguero 2016-04-14 15:18:49 CEST
Hi,

The code from upstream is so totally different from the code in our package that I think we should package a new version based upon the latest git commit (our code seems to have not changed since 2005 at least so I am not sure CVE-2016-1925 is the only security bug we have).

As a bonus, the version from 2016-02-02 upstream code that I packaged locally has an English man page and a "--help option".

Best regards,

Nico.

CC: (none) => nicolas.salguero

Nicolas Salguero 2016-04-14 15:19:10 CEST

Assignee: pkg-bugs => nicolas.salguero

Comment 3 Nicolas Salguero 2016-04-14 15:52:53 CEST
Suggested advisory:
========================

The updated package corrects a buffer overflow (CVE-2016-1925).
========================

Updated packages in core/updates_testing:
========================
i586:
lha-1.14i-20160202.1.mga5.i586.rpm

x86_64:
lha-1.14i-20160202.1.mga5.x86_64.rpm

Source RPMs:
lha-1.14i-20160202.1.mga5.src.rpm

Status: NEW => ASSIGNED
Hardware: i586 => All
Version: Cauldron => 5
Assignee: nicolas.salguero => qa-bugs
Whiteboard: MGA5TOO => (none)

Comment 4 David Walser 2016-04-14 17:44:34 CEST
Thanks Nicolas!

Suggested advisory:
========================

Updated lha package fixes security vulnerability:

The lha command is vulnerable to a buffer overflow while processing level 0
and level 1 headers while extracting an archive (CVE-2016-1925).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1925
http://openwall.com/lists/oss-security/2016/01/18/8
Comment 5 William Kenney 2016-04-16 19:29:36 CEST
In VirtualBox, M5, KDE, 32-bit

Package(s) under test:
lha

default install of lha

[root@localhost wilcal]# urpmi lha
Package lha-1.14i-26.mga5.i586 is already installed

I don't understand how to format the command.
See attachment.

CC: (none) => wilcal.int

Comment 6 William Kenney 2016-04-16 19:30:30 CEST
Created attachment 7677 [details]
lha example
Comment 7 William Kenney 2016-04-16 19:34:47 CEST
I found this:

http://www.pconhand.com/lha.asp
Comment 8 Nicolas Salguero 2016-04-18 11:24:03 CEST
Hi,

In your example, the right syntax is: "lha a test.lzh test.jpg".

Best regards,

Nico.
Comment 9 William Kenney 2016-04-18 17:33:59 CEST
(In reply to Nicolas Salguero from comment #8)

> In your example, the right syntax is: "lha a test.lzh test.jpg".

Neither:

lha a test.lzh test.jpg

lha a test.jpg test.lzh

work. :-((

[wilcal@localhost lha]$ lha a test.lzh test.jpg
LHa: Fatal error: /tmp/lhH8dayH: File exists

Seems to be building lots of these files in /tmp
Comment 10 Nicolas Salguero 2016-04-18 21:48:38 CEST
Yes, I get the same error with the old version of lha.  "lha a test.lzh test.jpg" works with the new version.

In fact, I am pretty sure lha did not work at all in the old version.
Comment 11 William Kenney 2016-04-18 22:16:20 CEST
(In reply to Nicolas Salguero from comment #10)

> In fact, I am pretty sure lha did not work at all in the old version.

Seems that way. I'll fire up the test system again tomorrow and we'll
get this turkey behind us.
Comment 12 Herman Viaene 2016-04-19 16:15:36 CEST
MGA-32 on Acer D620 Xfce
No installation issues.
At ClI:
$ lha  a P1013241.lzh P1013241.JPG 
P1013241.JPG	- Frozen(99%) oooooooooooooooooooooooooooooooooooooooooooooo
The file P1013241.lzh was created which I could open with ark and view the picture therein.

CC: (none) => herman.viaene
Whiteboard: (none) => has_procedure MGA5-32-OK

Comment 13 William Kenney 2016-04-19 17:42:36 CEST
In VirtualBox, M5, KDE, 32-bit

Package(s) under test:
lha

default install of lha

[root@localhost lha]# urpmi lha
Package lha-1.14i-20160202.1.mga5.i586 is already installed

[wilcal@localhost lha]$ lha a test.lzh test.jpg
test.jpg        - Frozen(99%) oooooooooooooooooooooooooooooooooooooo
created test.lzh
Comment 14 William Kenney 2016-04-19 17:55:13 CEST
In VirtualBox, M5, KDE, 64-bit

Package(s) under test:
lha

default install of lha

[root@localhost lha]# urpmi lha
Package lha-1.14i-20160202.1.mga5.x86_64 is already installed

[wilcal@localhost lha]$ lha a test.lzh test.jpg
test.jpg        - Frozen(98%) ooooo
created test.lzh
Comment 15 William Kenney 2016-04-19 17:56:11 CEST
This update works fine.
Testing complete for MGA5, 32-bit & 64-bit
Validating the update.
Could someone from the sysadmin team push to updates.
Great work everyone. Thanks.

Keywords: (none) => validated_update
Whiteboard: has_procedure MGA5-32-OK => has_procedure MGA5-32-OK MGA5-64-OK
CC: (none) => sysadmin-bugs

Comment 16 claire robinson 2016-04-21 10:03:30 CEST
Advisory uploaded.

Whiteboard: has_procedure MGA5-32-OK MGA5-64-OK => has_procedure advisory MGA5-32-OK MGA5-64-OK

Comment 17 Mageia Robot 2016-04-21 16:53:08 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGASA-2016-0142.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

David Walser 2016-04-22 18:34:33 CEST

URL: (none) => http://lwn.net/Vulnerabilities/684749/


Note You need to log in before you can comment on or make changes to this bug.