Wireshark-bugs: [Wireshark-bugs] [Bug 6779] New: User-Password - PAP decoding passwords longer t
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6779
Summary: User-Password - PAP decoding passwords longer than 16
bytes
Product: Wireshark
Version: 1.4.11
Platform: x86-64
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: Low
Component: Wireshark
AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
ReportedBy: mjl@xxxxxxxxxxxxx
Build Information:
Version 1.4.11 (SVN Rev 40428 from /trunk-1.4)
Copyright 1998-2012 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) with GTK+ 2.16.6, with GLib 2.22.4, with WinPcap (version
unknown), with libz 1.2.3, without POSIX capabilities, without libpcre, without
SMI, with c-ares 1.7.1, with Lua 5.1, without Python, with GnuTLS 2.10.3, with
Gcrypt 1.4.6, without Kerberos, with GeoIP, with PortAudio V19-devel (built Jan
10 2012), with AirPcap.
Running on 64-bit Windows 7 Service Pack 1, build 7601, with WinPcap version
4.1.2 (packet.dll version 4.1.0.2001), based on libpcap version 1.0 branch
1_0_rel0b (20091008), GnuTLS 2.10.3, Gcrypt 1.4.6, without AirPcap.
Built using Microsoft Visual C++ 9.0 build 21022
--
This is not particular to the build. The problem has been worse in past
versions.
The source code in packet-radius.c (function radius_decrypt_avp(...) is wrong
for the PAP User-Password attribute.
The radius specification is for a block chain of MD5s:
b1 = MD5(S + RA) c(1) = p1 xor b1
b2 = MD5(S + c(1)) c(2) = p2 xor b2
. .
. .
. .
bi = MD5(S + c(i-1)) c(i) = pi xor bi
It appears that radius_decrypt_avp() is using
b1 = MD5(S + RA) c(1) = p1 xor b1
b2 = c(2) = p2 xor b2
.
.
bi = c(i) = pi xor bi
For example a 44 byte password will have the first 16 bytes decoded correctly
but the last 28 (in my case 30 bytes) are garbage.
The User-Password is the correct length of 50 bytes.
The client correctly encodes the password.
Wireshark shows everything past 16 byes as garbage.
FreeRadius shows the decoded password correctly.
Reproducible with any PAP password over 16 bytes.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.