Default password encryption method.

2012-06-19 Thread ian ivy
Hello,

By default FreeBSD uses MD5 to encrypt passwords. MD5 is believed to be
more secure than e.g. DES but less than e.g. SHA512. Currently several
major Linux distributions, uses a SHA512 mechanism. Suse Linux also offers
a blowfish.

Some Debian based distributions use MD5-based algorithm compatible with the
one
used by recent releases of FreeBSD - but mostly this variable (*
MD5_CRYPT_ENAB*)
is deprecated, and SHA512-based algorithm is used.

Of course, in FreeBSD we can change the MD5 for example to BLF,
but, it will be not a better solution to use SHA512 by default?
___
freebsd-security@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to freebsd-security-unsubscr...@freebsd.org


FreeBSD Security Advisory FreeBSD-SA-12:04.sysret [REVISED]

2012-06-19 Thread FreeBSD Security Advisories
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

=
FreeBSD-SA-12:04.sysret Security Advisory
  The FreeBSD Project

Topic:  Privilege escalation when returning from kernel

Category:   core
Module: sys_amd64
Announced:  2012-06-12
Credits:Rafal Wojtczuk, John Baldwin
Affects:All supported versions of FreeBSD
Corrected:  2012-06-12 12:10:10 UTC (RELENG_7, 7.4-STABLE)
2012-06-12 12:10:10 UTC (RELENG_7_4, 7.4-RELEASE-p9)
2012-06-12 12:10:10 UTC (RELENG_8, 8.3-STABLE)
2012-06-12 12:10:10 UTC (RELENG_8_3, 8.3-RELEASE-p3)
2012-06-12 12:10:10 UTC (RELENG_8_2, 8.2-RELEASE-p9)
2012-06-18 21:00:54 UTC (RELENG_8_1, 8.1-RELEASE-p12)
2012-06-12 12:10:10 UTC (RELENG_9, 9.0-STABLE)
2012-06-12 12:10:10 UTC (RELENG_9_0, 9.0-RELEASE-p3)
CVE Name:   CVE-2012-0217

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit URL:http://security.FreeBSD.org/.

0.   Revision History

v1.0  2012-06-12 Initial release.
v1.1  2012-06-19 Corrected patch FreeBSD 8.1.

I.   Background

The FreeBSD operating system implements a rings model of security, where
privileged operations are done in the kernel, and most applications
request access to these operations by making a system call, which puts
the CPU into the required privilege level and passes control to the
kernel.

II.  Problem Description

FreeBSD/amd64 runs on CPUs from different vendors.  Due to varying
behaviour of CPUs in 64 bit mode a sanity check of the kernel may be
insufficient when returning from a system call.

III. Impact

Successful exploitation of the problem can lead to local kernel privilege
escalation, kernel data corruption and/or crash.

To exploit this vulnerability, an attacker must be able to run code with user
privileges on the target system.

IV.  Workaround

No workaround is available.

However FreeBSD/amd64 running on AMD CPUs is not vulnerable to this
particular problem.

Systems with 64 bit capable CPUs, but running the 32 bit FreeBSD/i386
kernel are not vulnerable, nor are systems running on different
processor architectures.

V.   Solution

Perform one of the following:

1) Upgrade your vulnerable system to 7-STABLE, 8-STABLE, or 9-STABLE,
or to the RELENG_7_4, RELENG_8_3, RELENG_8_2, RELENG_8_1, or RELENG_9_0
security branch dated after the correction date.

2) To update your vulnerable system via a source code patch:

The following patches have been verified to apply to FreeBSD 7.4,
8.3, 8.2, 8.1 and 9.0 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

[7.4, 8.3, 8.2, 9.0]
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret.patch
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret.patch.asc

[8.1]
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81.patch
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81.patch.asc

[8.1 if original sysret.patch has been applied]
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81-correction.patch
# fetch 
http://security.FreeBSD.org/patches/SA-12:04/sysret-81-correction.patch.asc

b) Apply the patch.

# cd /usr/src
# patch  /path/to/patch

c) Recompile your kernel as described in
URL:http://www.FreeBSD.org/handbook/kernelconfig.html and reboot the
system.

3) To update your vulnerable system via a binary patch:

Systems running 7.4-RELEASE, 8.3-RELEASE, 8.2-RELEASE, 8.1-RELEASE,
or 9.0-RELEASE on the i386 or amd64 platforms can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

VI.  Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

CVS:

Branch   Revision
  Path
- -
RELENG_7
  src/sys/amd64/amd64/trap.c   1.319.2.14
RELENG_7_4
  src/UPDATING1.507.2.36.2.11
  src/sys/conf/newvers.sh  1.72.2.18.2.14
  src/sys/amd64/amd64/trap.c   1.319.2.12.2.2
RELENG_8
  src/sys/amd64/amd64/trap.c   1.332.2.24
RELENG_8_3
  src/UPDATING 1.632.2.26.2.5
  src/sys/conf/newvers.sh   1.83.2.15.2.7
  src/sys/amd64/amd64/trap.c   1.332.2.21.2.2
RELENG_8_2
  src/UPDATING1.632.2.19.2.11
  src/sys/conf/newvers.sh  

Re: Default password encryption method.

2012-06-19 Thread Simon L. B. Nielsen
On Jun 19, 2012 3:16 PM, Maxim Khitrov m...@mxcrypt.com wrote:

 On Tue, Jun 19, 2012 at 10:10 AM, ian ivy sidetripp...@gmail.com wrote:
  Hello,
 
  By default FreeBSD uses MD5 to encrypt passwords. MD5 is believed to be
  more secure than e.g. DES but less than e.g. SHA512. Currently several
  major Linux distributions, uses a SHA512 mechanism. Suse Linux also
offers
  a blowfish.
 
  Some Debian based distributions use MD5-based algorithm compatible with
the
  one
  used by recent releases of FreeBSD - but mostly this variable (*
  MD5_CRYPT_ENAB*)
  is deprecated, and SHA512-based algorithm is used.
 
  Of course, in FreeBSD we can change the MD5 for example to BLF,
  but, it will be not a better solution to use SHA512 by default?

 This has been discussed recently in the following thread:

 http://lists.freebsd.org/pipermail/freebsd-security/2012-June/006271.html

The FreeBSD Security Team is also looking at (/poking people to look at)
solutions which will improve the the time it takes to brute force passwords
significantly more.

-- 
Simon
___
freebsd-security@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to freebsd-security-unsubscr...@freebsd.org


Re: Update for FreeBSD Security Advisory FreeBSD-SA-12:04.sysret for 8.1

2012-06-19 Thread Simon L. B. Nielsen

On 19 Jun 2012, at 19:15, Steven Chamberlain wrote:

 On 18/06/12 22:37, Simon L. B. Nielsen wrote:
 Note that this is ONLY for FreeBSD 8.1. Other branches are OK.
 
 Having seen the correct fix now, I'm starting to wonder if the commit to
 RELENG_7_4 was really okay too?
 
 http://svnweb.freebsd.org/base/releng/7.4/sys/amd64/amd64/trap.c?annotate=236953#l975
 
 The inserted code does not appear at the end of the function, like it
 does now in all other versions including 8.1 which is the most similar.
 
 I expect this would at least trap if the exploit was attempted, but then
 it would omit the rest of the function, including userret();  would that
 have consequences?

From what our kernel experts (jhb/kib - sorry can't recall who checked this), 
it should still work fine in the location it is in for 7.4.

-- 
Simon L. B. Nielsen

___
freebsd-security@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to freebsd-security-unsubscr...@freebsd.org