asn1: additional sanity checking during BER decoding (CVE-2008-1673)
Chris Wright authored
upstream commit: ddb2c435



- Don't trust a length which is greater than the working buffer.
  An invalid length could cause overflow when calculating buffer size
  for decoding oid.

- An oid length of zero is invalid and allows for an off-by-one error when
  decoding oid because the first subid actually encodes first 2 subids.

- A primitive encoding may not have an indefinite length.

Thanks to Wei Wang from McAfee for report.

Cc: Steven French <sfrench@us.ibm.com>
Cc: stable@kernel.org
Acked-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
33afb840
Name Last commit Last update
..
802 [TR] net/802/tr.c: sysctl_tr_rif_timeout static
8021q [VLAN]: Fix egress priority mappings leak.
9p net/9p/trans_fd.c:p9_trans_fd_init(): module_init functions should return 0 on success
appletalk [APPLETALK]: Use proc_create() to setup ->proc_fops first
atm [NET]: Undo code bloat in hot paths due to print_mac().
ax25 [AX25]: Potential ax25_uid_assoc-s leaks on module unload.
bluetooth bluetooth : __rfcomm_dlc_close lock fix
bridge [BRIDGE]: Fix crash in __ip_route_output_key with bridge netfilter
can can: Fix can_send() handling on dev_queue_xmit() failures
core RTNETLINK: Fix bogus ASSERT_RTNL warning
dccp dccp: return -EINVAL on invalid feature length
decnet [DECNET] ROUTE: remove unecessary alignment
econet [NET]: Convert init_timer into setup_timer
ethernet [NET]: Return more appropriate error from eth_validate_addr().
ieee80211 [NET]: Undo code bloat in hot paths due to print_mac().
ipv4 asn1: additional sanity checking during BER decoding (CVE-2008-1673)
ipv6 {nfnetlink, ip, ip6}_queue: fix skb_over_panic when enlarging packets
ipx [IPX]: Use proc_create() to setup ->proc_fops first
irda [IRDA]: Store irnet_socket termios properly.
iucv iucv: fix build error on !SMP
key IPSEC: Fix catch-22 with algorithm IDs above 31
lapb [LAPB] net/lapb/lapb_iface.c: use LIST_HEAD instead of LIST_HEAD_INIT
llc [LLC]: skb allocation size for responses
mac80211 mac80211: remove message on receiving unexpected unencrypted frames
netfilter {nfnetlink, ip, ip6}_queue: fix skb_over_panic when enlarging packets
netlabel
netlink
netrom
packet
rfkill
rose
rxrpc
sched
sctp
sunrpc
tipc
unix
wanrouter
wireless
x25
xfrm
Kconfig
Makefile
TUNABLE
compat.c
nonet.c
socket.c
sysctl_net.c