[Bug 329678] New: boot.md: bad tempfile handling
https://bugzilla.novell.com/show_bug.cgi?id=329678 Summary: boot.md: bad tempfile handling Product: openSUSE 10.3 Version: RC 2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: suse-beta@cboltz.de QAContact: qa@suse.de Found By: --- /etc/init.d/boot.md can be broken quite easily: (move away /etc/mdadm.conf if it exists) # mkdir /tmp/mdadm.conf # /etc/init.d/boot.md start Starting MD Raid rm: cannot remove `/tmp/mdadm.conf': Is a directory /etc/init.d/boot.md: line 131: /tmp/mdadm.conf: Is a directory failed mdadm: No arrays found in config file failed Relevant code: else # do auto-assemly only if /etc/mdadm.conf is missing rm -f /tmp/mdadm.conf if ! mdadm --examine --scan --config=partitions >/tmp/mdadm.conf Please use a mktemp-generated tempfile instead. You can feel lucky that this script runs at boot time only. Otherwise I would also have warned that there could be a symlink attack between the rm and writing the file... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=329678
Matej Horvath
https://bugzilla.novell.com/show_bug.cgi?id=329678#c1
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=329678
User mmarek@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=329678#c2
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=329678
User suse-beta@cboltz.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=329678#c3
Christian Boltz
participants (1)
-
bugzilla_noreply@novell.com