Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 73943
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sune Kloppenborg Jeppesen <jaervosz@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
samba-3.0.9-CAN-2004-1154.patch samba-3.0.9-CAN-2004-1154.patch patch Sune Kloppenborg Jeppesen 2004-12-09 13:56 0000 417.69 KB Details | Diff
samba-3.0.9-r1.ebuild.patch samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild patch Christian Andreetta (RETIRED) 2004-12-10 06:10 0000 1.04 KB Details | Diff
samba-3.0.9-r1.ebuild.patch samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild patch Christian Andreetta (RETIRED) 2004-12-10 07:01 0000 2.94 KB Details | Diff
samba-3.0.9-r1.ebuild.patch samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild patch Christian Andreetta (RETIRED) 2004-12-16 04:21 0000 2.99 KB Details | Diff
samba-3.0.9-bitmap.c-4120.patch files/samba-3.0.9-bitmap.c-4120.patch patch Christian Andreetta (RETIRED) 2004-12-16 04:23 0000 786 bytes Details | Diff
samba-3.0.9-r1.ebuild.patch samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild patch Christian Andreetta (RETIRED) 2004-12-16 07:31 0000 2.99 KB Details | Diff
samba-3.0.9-util.c-bitpmap.c-4120.patch files/samba-3.0.9-util.c-bitmap.c-4120.patch patch Christian Andreetta (RETIRED) 2004-12-16 07:32 0000 1.83 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 73943 depends on: Show dependency tree
Bug 73943 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-12-09 13:53 0000
==========================================================
==
== Subject:     Possible remote code execution
== CVE ID#:     CAN-2004-1154
==
== Versions:    Samba 2.x & 3.0.x <= 3.0.9
==
== Summary:     A potential integer overflow when
==              unmarshalling specific MS-RPC requests
==              from clients could lead to heap
==              corruption and remote code execution.
==
==========================================================

| Our plans are to release 3.0.10 on Thursday, December
| 16, 6am CST (GMT-6) to address this security hole
| and one other segv fault.
|
| The patch is rather large due to the fact that once
| you point out one integer overflow, everyone starts
| looking for more.  The changes address the specific
| issue that was originally reported as well as attempting
| to reduce the possibility of similar exploits following
| the public announcement.


===========
Description
===========

Remote exploitation of an integer overflow vulnerability
in the smbd daemon included in Samba 2.0.x, Samba 2.2.x,
and Samba 3.0.x prior to and including 3.0.9 could
allow an attacker to cause controllable heap corruption,
leading to execution of arbitrary commands with root
privileges.

Successful remote exploitation allows an attacker to
gain root privileges on a vulnerable system. In order
to exploit this vulnerability an attacker must possess
credentials that allow access to a share on the Samba server.
Unsuccessful exploitation attempts will cause the process
serving the request to crash with signal 11, and may leave
evidence of an attack in logs.


==================
Patch Availability
==================

A patch for Samba 3.0.9 (samba-3.0.9-CAN-2004-1154.patch)
has been attached to this mail.  The patch has been
signed with the "Samba Distribution Verification Key"
(ID F17F9772).


=============================
Protecting Unpatched Servers
=============================

The Samba Team always encourages users to run the latest
stable release as a defense against attacks.  However,
under certain circumstances it may not be possible to
immediately upgrade important installations.  In such
cases, administrators should read the "Server Security"
documentation found at

http://www.samba.org/samba/docs/server_security.html.


=======
Credits
=======

This security issue was reported to Samba developers by
iDEFENSE Labs.  The vulnerability was discovered by Greg
MacManus, iDEFENSE Labs.


==========================================================
== Our Code, Our Bugs, Our Responsibility.
== The Samba Team
==========================================================

------- Comment #1 From Sune Kloppenborg Jeppesen 2004-12-09 13:56:08 0000 -------
Created an attachment (id=45624) [details]
samba-3.0.9-CAN-2004-1154.patch

------- Comment #2 From Sune Kloppenborg Jeppesen 2004-12-09 13:58:52 0000 -------
Christian please prepare and attach an updated ebuild (do NOT commit to Portage
yet) so we can call on specific devs to mark stable.

------- Comment #3 From Christian Andreetta (RETIRED) 2004-12-10 06:10:25 0000 -------
Created an attachment (id=45681) [details]
samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild

Since the size of the patch (> 400Kb, 70Kb bzipped), I put it in my web space.
The installation seems straightforward, and the functionality tests I made were
all successful.
Only a note for the cvs commiters: please refetch all your old copies of
smbldap*, since at least one of you has a deprecated version (which may be
saved in the digest files): the upstream packager did retain the same version
number for two different releases. :-(

------- Comment #4 From Christian Andreetta (RETIRED) 2004-12-10 07:01:24 0000 -------
Created an attachment (id=45682) [details]
samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild

small lib preload fix. other comments as before.

------- Comment #5 From Thierry Carrez (RETIRED) 2004-12-10 07:44:18 0000 -------
Everyone : this is a confidential bug, please do not disclose any of it.

We need you to test the samba-3.0.9-r1.ebuild that is provided on this bug and report here if it can be committed as stable directly on your platform.

Target KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86"
Calling last stable markers for each supported arch:
for alpha -> kloeri@gentoo.org
for amd64 -> blubb@gentoo.org
for ppc   -> SeJo@gentoo.org
for ppc64 -> corsair@gentoo.org
for sparc -> gustavoz@gentoo.org
for x86   -> tester@gentoo.org

If you can't handle it, please comment here and give us the name of someone who can :)
Thanks in advance.

------- Comment #6 From Gustavo Zacarias (RETIRED) 2004-12-10 12:43:08 0000 -------
green light on sparc.

------- Comment #7 From Simon Stelling (RETIRED) 2004-12-10 14:00:02 0000 -------
looks good so far on amd64

------- Comment #8 From Olivier Crete 2004-12-10 14:57:03 0000 -------
I have a problem on x86 with USE=cups if I start samba with cups running it
segfaults in smbd with this stacktrace... I'll check if it happens on the
version that currently stable..

Dec 10 17:54:54 [smbd] #3 [0xffffe420]_
Dec 10 17:54:54 [smbd] #4 /lib/libc.so.6(malloc+0x8e) [0xb7d8f8de]_
Dec 10 17:54:54 [smbd] #5 /usr/sbin/smbd(bitmap_allocate+0x40) [0x81b2810]_
Dec 10 17:54:54 [smbd] #6 /usr/sbin/smbd(init_rpc_pipe_hnd+0x12) [0x813e0fc]_
Dec 10 17:54:54 [smbd] #7 /usr/sbin/smbd [0x8218a22]_
Dec 10 17:54:54 [smbd] #8 /usr/sbin/smbd(main+0x273) [0x8218ca6]_

------- Comment #9 From Olivier Crete 2004-12-10 15:28:35 0000 -------
and the cups stuff works with 3.0.8.. I'll try to get more details later
tonight or tomorrow morning.

------- Comment #10 From Olivier Crete 2004-12-11 14:46:20 0000 -------
The bug is definitely with the patch... I dont have enough free hd space to
build it with -g ... Can anyone else reproduce it ?

------- Comment #11 From Jochen Maes (RETIRED) 2004-12-13 23:09:28 0000 -------
looks good on ppc...

greets

------- Comment #12 From Bryan Østergaard (RETIRED) 2004-12-14 13:31:01 0000 -------
Alpha is good.

------- Comment #13 From Sune Kloppenborg Jeppesen 2004-12-14 14:29:20 0000 -------
Christian (and anyone else on x86) please look into comment #8

------- Comment #14 From Christian Andreetta (RETIRED) 2004-12-15 03:35:11 0000 -------
Tested on x86, with '-g': it needs over 1.1 Gb of space...
Cups seems ok: I didn't have any errors.

------- Comment #15 From Sune Kloppenborg Jeppesen 2004-12-15 04:19:53 0000 -------
corsair please test this asap and report back. If you're not able to do it
please point out someone who is.

Tester can you retest on x86?

------- Comment #16 From Markus Rothe 2004-12-15 07:50:13 0000 -------
looks good on ppc64

------- Comment #17 From Sune Kloppenborg Jeppesen 2004-12-15 08:05:36 0000 -------
We are still on track for the release tomorrow morning
at 6am GMT-6.

Back to ebuild status. Christian please apply the needed patches ASAP.

----

There are 2 additional patches included in the 3.0.10
release. 

------- Comment #18 From Sune Kloppenborg Jeppesen 2004-12-15 08:05:36 0000 -------
We are still on track for the release tomorrow morning
at 6am GMT-6.

Back to ebuild status. Christian please apply the needed patches ASAP.

----

There are 2 additional patches included in the 3.0.10
release.  Both should apply to 3.0.9 + the CAN=2004-1154
patch previously posted.

http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=2413

http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=4120

Neither are required for security.  However, the second is
needed for stability.

------- Comment #19 From Olivier Crete 2004-12-15 10:31:54 0000 -------
My cups bug is fixed by 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=4120
With this patch I declare it ok on x86

------- Comment #20 From Christian Andreetta (RETIRED) 2004-12-16 04:21:33 0000 -------
Created an attachment (id=46112) [details]
samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild

http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=2413 is already
present in 3.0.9
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=4120: first part
(lib/util.c) is invalid for 3.0.9; second part (lib/bitmap.c) is ok

------- Comment #21 From Christian Andreetta (RETIRED) 2004-12-16 04:23:31 0000 -------
Created an attachment (id=46113) [details]
files/samba-3.0.9-bitmap.c-4120.patch

http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=4120: bitmap part

------- Comment #22 From Luke Macken (RETIRED) 2004-12-16 06:32:06 0000 -------
this issue is now public

http://www.idefense.com/application/poi/display?id=165

------- Comment #23 From Christian Andreetta (RETIRED) 2004-12-16 07:31:01 0000 -------
Created an attachment (id=46125) [details]
samba-3.0.9-r1.ebuild diff against samba-3.0.9.ebuild

forget comment #20:
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=4120 is partially a
fix to the CAN patch, so what I tought to be the 'invalid' portion was the
remedy the a post-CAN bug.

------- Comment #24 From Christian Andreetta (RETIRED) 2004-12-16 07:32:14 0000 -------
Created an attachment (id=46126) [details]
files/samba-3.0.9-util.c-bitmap.c-4120.patch

and now the patch...

------- Comment #25 From Olivier Crete 2004-12-16 07:42:34 0000 -------
I confirm that the patches from comments 22 and 23 work on x86

------- Comment #26 From Matthias Geerdsen 2004-12-16 10:04:16 0000 -------
Samba advisory has been published at
http://www.samba.org/samba/security/CAN-2004-1154.html

Patch at
http://www.samba.org/samba/ftp/patches/security/samba-3.0.9-CAN-2004-1154.patch
Signature:
http://www.samba.org/samba/ftp/patches/security/samba-3.0.9-CAN-2004-1154.patch.asc

------- Comment #27 From Sune Kloppenborg Jeppesen 2004-12-16 14:10:48 0000 -------
As this is now public unCC'ing specific devs and adding arches.

Please mark stable ASAP.

Thx.

------- Comment #28 From Sune Kloppenborg Jeppesen 2004-12-16 14:28:00 0000 -------
Ok arches, no ebuild in Portage yet. Please test the one on the bug.

Christian please commit the fixed ebuild.

------- Comment #29 From Olivier Crete 2004-12-16 14:39:45 0000 -------
might be useful to have the samba ppl in CC... 
Samba ppl: you have x time (x being a small number) before I commit the last attachment to the tree...

------- Comment #30 From Christian Andreetta (RETIRED) 2004-12-17 01:01:01 0000 -------
Guessing I'm beyond x, so unmasking for all archs (since it' a CAN, even for
the untested ones...)
Closing?

------- Comment #31 From Sune Kloppenborg Jeppesen 2004-12-17 01:14:07 0000 -------
Thx Christian.

Marked stable on all arches, we're ready for GLSA.

------- Comment #32 From Jeremy Huddleston (RETIRED) 2004-12-17 01:36:00 0000 -------
When was it made policy that CAN's get pushed into stable before arch testing? 
Especially since it was a version bump as well (most archs were at 3.0.8
stable)...

------- Comment #33 From Sune Kloppenborg Jeppesen 2004-12-17 01:55:28 0000 -------
Jeremy it's not policy for CANs. But it is custom practice to let the package
maintainer decide stable markings.

------- Comment #34 From Jeremy Huddleston (RETIRED) 2004-12-17 02:35:42 0000 -------
I can understand this being acceptable if the delta was small (just the
security patch), but it's also version bumping.  It is clear in Gentoo policy
that developers can only mark a stable package if they have access to that
arch.  Again, I can understand bending the rules for a minimal security patch,
but this is just too much.

------- Comment #35 From Ciaran McCreesh 2004-12-17 02:40:00 0000 -------
With the exception of portage and baselayout, package maintainers *never*
decide whether ebuilds go stable on archs which they don't have access to. This
is a policy violation, and a fairly nasty one at that... Adding devrel to the
Cc: list -- can you guys please help ensure that this never happens again?
Seems all those emails I send out about it just aren't enough.

------- Comment #36 From Jeremy Huddleston (RETIRED) 2004-12-17 02:58:13 0000 -------
readding archs so they can actually test the package even though it's already
marked stable...

I intentionally left amd64 off as I've tested it already on that arch.

------- Comment #37 From Christian Andreetta (RETIRED) 2004-12-17 03:01:50 0000 -------
eradicator: you're right. I've already (re)masked the archs not tested in this
bug. So, the still stable archs are alpha, amd64, ppc, ppc64, sparc and x86
(which gave their ok in this bug).
I know I could have been too fast, but, since the tests on all these platforms
were successfull (even with the (upstream words) 'excessive zelous' CAN
corrected by the latest 'minor' patch), I felf confident on the release.
So, the unmasked time range was about half an hour: I'm now waiting for other
platform approval.

------- Comment #38 From Sune Kloppenborg Jeppesen 2004-12-17 03:22:24 0000 -------
Then perhaps the policy should say that in a big fat warning. I don't think
this is anything for devrel and if someone think it is it should be handled on
a separate bug.

Snip from current Ebuild policy:

Moving package versions from ~ARCH to ARCH


When a package version has proved stable for sufficient time and the Gentoo
maintainer of the package is confident that the upgrade will not break a
regular Gentoo user's machine, then it can be moved from ~ARCH to ARCH. An
indication of the package's stability would be no verified or unresolved bug
report for a month after the version's introduction. 

It is up to the maintainer of the package to deem which versions are stable or
if development versions should be in package.mask or left in ~arch. 

You must also ensure that all the dependencies of such a package version are
also in ARCH. 

Warning: The ~ARCH step may only be ignored if and only if the concerned
package version contains a security fix or is needed to fix an important bug in
the Gentoo system. 

------- Comment #39 From Christian Andreetta (RETIRED) 2004-12-17 03:53:57 0000 -------
a partial comment on #33, #36 and #37 (brief, I promise :-):
-- since it's for a glsa, and appreciating the urgence, I unmasked all remaing platforms in the ebuild: this lasted for half an hour.
-- _my_ fault: after the first comment of eradicator, I left stable only the 6 archs that gave me ok to proceed. But this fault was made with a lot of pre-reasoning:
-- 3.0.8 has been an upstream rush to close another security flaw: upstream maintainers did indeed introduce some bugs in it (docs and kde subcomponents issues for example: for more info, see the 3.0.9 release note: mainly bug fixes): 3.0.9 is the 'what we though for 3.0.8 but we did't have the time to do it' (mine words, but not mine concepts).

So, I'm here suggesting: could it be sufficient a 'majority' of platform testing to mark a release stable for all others, if a glsa is involved? (majority==2/3 of platforms? 75% of user base (I know this is unfair for some archs)?)
Or: what about platform-based glsa, if needed?
I know this is not the proper place to discuss this, but the CC includes all archs, devrel and security, so...

------- Comment #40 From Sune Kloppenborg Jeppesen 2004-12-17 04:02:21 0000 -------
This is not the place to discuss this. Please read
http://www.gentoo.org/security/en/vulnerability-policy.xml and open a new
bug/send mail to security if anything needs to be change, thanks.

Arches: sorry for the noise, please mark stable.

------- Comment #41 From Bryan Østergaard (RETIRED) 2004-12-17 11:27:38 0000 -------
samba-3.0.9-r1 is good on alpha.

------- Comment #42 From Gustavo Zacarias (RETIRED) 2004-12-17 11:28:33 0000 -------
sparc ok after the new patch and tests.


------- Comment #43 From Markus Rothe 2004-12-17 13:50:19 0000 -------
samba-3.0.9-r1 is good on ppc64

------- Comment #44 From Michael Hanselmann (hansmi) (RETIRED) 2004-12-17 14:18:43 0000 -------
Tested again on ppc and removing CC.

------- Comment #45 From Seemant Kulleen (RETIRED) 2004-12-17 15:20:30 0000 -------
actually removing the cc :P

------- Comment #46 From Sune Kloppenborg Jeppesen 2004-12-18 01:09:13 0000 -------
Thank you all, closing with GLSA 200412-13.

arm, hppa, ia64, mips, s390 please remember to mark stable.

------- Comment #47 From Guy Martin 2004-12-21 07:00:28 0000 -------
Stable on hppa.

------- Comment #48 From Hardave Riar (RETIRED) 2004-12-29 19:30:43 0000 -------
Stable on mips.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug