From d559f4679cf8520d3ec2f3b9d75ca11a34b011c0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sep 13 2013 15:07:25 +0000 Subject: dracut-033-3.git20130913 - do not dhcp members of team, bond, etc. - harden against weird ppc kernel driver Resolves: rhbz#1007891 --- diff --git a/0001-dracut.sh-harden-host_modalias-reading.patch b/0001-dracut.sh-harden-host_modalias-reading.patch new file mode 100644 index 0000000..a695138 --- /dev/null +++ b/0001-dracut.sh-harden-host_modalias-reading.patch @@ -0,0 +1,26 @@ +From 57f90974f9d7c11e06c2b3f2b7e4b47801f380cc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 13 Sep 2013 16:33:01 +0200 +Subject: [PATCH] dracut.sh: harden host_modalias reading + +Some weird PPC driver make their modulias unreadable + +$ cat /sys/devices/vio/4000/modalias +cat: /sys/devices/vio/4000/modalias: No such device +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index bd905e3..fd27846 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -921,7 +921,7 @@ if [[ $hostonly ]]; then + declare -A host_modalias + find /sys/devices/ -name modalias -print > "$initdir/.modalias" + while read m; do +- host_modalias["$(<"$m")"]=1 ++ modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1 + done < "$initdir/.modalias" + rm -f -- "$initdir/.modalias" + diff --git a/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch b/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch new file mode 100644 index 0000000..0a2a216 --- /dev/null +++ b/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch @@ -0,0 +1,35 @@ +From 63f3bcd85245901515f4f45238301e030468cdc5 Mon Sep 17 00:00:00 2001 +From: WANG Chao +Date: Fri, 13 Sep 2013 22:28:44 +0800 +Subject: [PATCH] ifup: do not dhcp on network interface of secondary stack + +Configure cmdline to: + ip=br0:dhcp bridge=br0:bond0 bond=bond0:eth0 + +By default ifup bond0 will run dhcp on bond0, which is wrong. bond0 +isn't the top interface. we should really run dhcp on br0. + +So if we ifup an network interface on secondary stack, we should not +dhcp. Fix this issue with this patch. +--- + modules.d/40network/ifup.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 3261647..9f6f449 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -336,6 +336,13 @@ for p in $(getargs ip=); do + exit 0 + done + ++# netif isn't the top stack? Then we should exit here. ++# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp ++# bond0 doesn't make sense. ++if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then ++ exit 0 ++fi ++ + # no ip option directed at our interface? + if [ ! -e /tmp/setup_net_${netif}.ok ]; then + do_dhcp -4 diff --git a/dracut.spec b/dracut.spec index 5d3a990..a84283e 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 1%{?dist} +Release: 3.git20130913%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -29,6 +29,8 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 +Patch1: 0001-dracut.sh-harden-host_modalias-reading.patch +Patch2: 0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch BuildRequires: bash git @@ -446,6 +448,11 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Fri Sep 13 2013 Harald Hoyer 033-3.git20130913 +- do not dhcp members of team, bond, etc. +- harden against weird ppc kernel driver +Resolves: rhbz#1007891 + * Thu Sep 12 2013 Harald Hoyer 033-1 - do not cache the kernel cmdline Resolves: rhbz#989944