Wind River Support Network

HomeDefectsLIN7-7029
Fixed

LIN7-7029 : Cross-compiling CRDA with openssl support does not take into account target word size for keys-ssl.c

Created: Nov 21, 2016    Updated: Sep 8, 2018
Resolved Date: Nov 23, 2016
Found In Version: 7.0.0.21
Fix Version: 7.0.0.22
Severity: Severe
Applicable for: Wind River Linux 7
Component/s: Userspace

Description

Cross-compiling CRDA with openssl support does not take into account target word size for keys-ssl.c

This can pose issues when the host is 64 bit and target is 32 bit, as running crda will fail to check the digest of /usr/lib/crda/regulatory.bin

For a 32 bit target, keys-ssl.c may look like this:

static BN_ULONG n_0[64] = {
    0x16a0d8e1, 0x63a27054, 0xc8ba757b, 0xdc9fca11, 
.....

This exact scenario happens on customer's side.

Issue has also been discussed upstream:
http://osdir.com/ml/linux-wireless/2009-07/msg00749.html

The suggestion would be to perform a check beforehand so that the key is converted appropriately.

On my side, regardless of whether the target is 32 or 64 bit, the key will be converted into 32 bit ulong. This is the better scenario as 32 bit key will not be an issue for the 64 bit system. However, since no proper check seems to be in place, this can go either way.

Steps to Reproduce

1. Configure a project 
wrlinux-7/wrlinux/configure --enable-board=xilinx-zynq --enable-kernel=standard --enable-rootfs=glibc_std --with-package=crda --enable-reconfig=yes --enable-internet-download=yes
2. Edit recipe layers/meta-networking/recipes-connectivity/crda/crda_1.1.3.bb to enable openssl support:
DEPENDS = "python-m2crypto-native python-native openssl libnl"
EXTRA_OEMAKE += "USE_OPENSSL=1"
either by hand or bbappend
3. build crda 
4. check build/crda/crda-1.1.3/keys-ssl.c

Other Downloads


Live chat
Online