centos 6
crypto weakness #352

4

Weakness Breakdown


Definition:

This weakness involves creating non-standard or non-tested algorithms, using weak algorithms or applying cryptographic algorithms incorrectly. Algorithms that were once considered safe are commonly later found to be unsafe, as the algorithms were broken.

Warning code(s):

The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment.

File Name:

qemu-0.15.0/roms/ipxe/src/net/80211/sec80211.c

Context:

The highlighted line of code below is the trigger point of this particular Centos 6 crypto weakness.

 	if ( crypt == NET80211_CRYPT_NONE ) {
		DBG ( "802.11-Sec not installing null cryptography\n" );
		return 0;
	}

	/* Find cryptosystem to use */
	for_each_table_entry ( tbl_crypto, NET80211_CRYPTOS ) {
		if ( tbl_crypto->algorithm == crypt ) {
			crypto = zalloc ( sizeof ( *crypto ) +
					  tbl_crypto->priv_len );
			if ( ! crypto ) {
				DBG ( "802.11-Sec out of memory\n" );
				return -ENOMEM;
			}

			memcpy ( crypto, tbl_crypto, sizeof ( *crypto ) );
			crypto->priv = ( ( void * ) crypto +
					 sizeof ( *crypto ) );
			break;
		}
	}

	if ( ! crypto ) {
		DBG ( "802.11-Sec no support for cryptosystem %d\n", crypt );
		return -ENOTSUP_CRYPT ( crypt );
	}

	*which = crypto;

	DBG ( "802.11-Sec installing cryptosystem %d as %p with key of "
	      "length %d\n", crypt, crypto, len );

	return crypto->init ( crypto, key, len, rsc );
}


/**
 * Determine net80211 crypto or handshaking type value to return for RSN info
 *
 * @v rsnp		Pointer to next descriptor count field in RSN IE
 * @v rsn_end		Pointer to end of RSN IE
 * @v map		Descriptor map to use
 * @v tbl_start		Start of linker table to examine for iPXE support
 * @v tbl_end		End of linker table to examine for iPXE support
 * @ret rsnp		Updated to point to first byte after descriptors
 * @ret map_ent		Descriptor map entry of translation to use
 *
 * The entries in the linker table must be either net80211_crypto or
 * net80211_handshaker structures, and @a tbl_stride must be set to
 * sizeof() the appropriate one. 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.