Bug 682290 - ifcfg plugin can write connection name containing newlines, corrupting file
Summary: ifcfg plugin can write connection name containing newlines, corrupting file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-04 19:00 UTC by Matt McCutchen
Modified: 2012-08-16 13:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 13:00:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matt McCutchen 2011-03-04 19:00:49 UTC
Description of problem:
I noticed something goofy; I don't know if anyone cares.  The ifcfg plugin is good about escaping funny characters in connection names, with the exception of newlines.  If I enter a connection name with newlines (Ctrl-Shift-U, A), the name is saved to the ifcfg file, newlines and all, and will be read back as multiple variable definitions.

This would allow a user with org.freedesktop.network-manager-settings.system.modify privilege to escalate to root by injecting USERCTL=true and a shell command and then running usernetctl.  But I think org.freedesktop.network-manager-settings.system.modify is considered equivalent to root anyway.  At least it requires the root password by default.

Version-Release number of selected component (if applicable):
NetworkManager-0.8.3.997-1.fc14
(Same in NetworkManager-0.8.1-10.git20100831.fc14)

How reproducible:
Always

Steps to Reproduce:
1. Create a wired connection named `test' and save it to the system settings.
2. Change the name to `test\nUSERCTL=true\nwall ouch #', where `\n' stands for a newline entered via Ctrl-Shift-U, A.
3. Change the name back to `test'.
4. usernetctl test up

Actual results:
"ouch" gets broadcasted.

Expected results:
Format integrity of /etc/sysconfig/network-scripts/ifcfg-test is maintained.

Comment 1 Fedora End Of Life 2012-08-16 13:00:19 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.