[SRU] powerpc-utils commands exhibits "command substitution: ignored null byte in input" warning message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Released
|
Medium
|
Canonical Foundations Team | ||
powerpc-utils (Ubuntu) |
Fix Released
|
Medium
|
Adam Conrad | ||
Zesty |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
[Impact]
The current version of powerpc-utils in Ubuntu Zesty and Artful carries a bug exposed by bash 4.4+ which causes a warning to be logged to stderr in 4 different commands: ls-veth, ls-vscsi, lsdevinfo, and ofpathname. Bash is unable to store the NUL bytes in the result of a command substitution, prior to 4.4 it silently dropped the NUL bytes, but since 4.4 it drops the NUL bytes with a warning: "command substitution: ignored null byte in input".
Additionally to that the ofpathname command also had a bug that caused a "cd: too many arguments" warning.
Upstream has fixed both [1] and they now need to be backport to Zesty.
[Test Case 1]
Call any of the affected commands without arguments, they should output "command substitution: ignored null byte in input" to stderr.
The same warning can easily be reproduced in bash 4.4+ by executing:
$ x=$(cat < /proc/$$/cmdline)
bash: warning: command substitution: ignored null byte in input
And to fix it:
$ x=$(tr -d '\0' < /proc/$$/cmdline)
<no output, as expected>
[Test Case 2]
Call ofpathname with no arguments:
$ ofpathname
cd: too many arguments
[Regression Potential]
The replacement of 'cat' with 'tr -d "\0"' causes no regression. Also, both commands are part of coreutils.
The 'cd' fix replaces it with a drop_dir call. In case the requested path is not found then the previous behavior would be kept (ie. no directory change).
[Other Info]
Upstream fix link:
[1] https:/
[Old description]
Please cherry pick...
https:/
tags: | added: ubuntu-17.04 |
Changed in powerpc-utils (Ubuntu): | |
assignee: | Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Kernel Team (canonical-kernel-team) |
importance: | Undecided → Medium |
Changed in ubuntu-power-systems: | |
importance: | Undecided → Medium |
Changed in powerpc-utils (Ubuntu): | |
assignee: | Canonical Kernel Team (canonical-kernel-team) → Canonical Foundations Team (canonical-foundations) |
tags: |
added: triage-r removed: triage-a |
Changed in powerpc-utils (Ubuntu): | |
status: | New → Triaged |
description: | updated |
summary: |
- Ubuntu 17.04: "command substitution: ignored null byte in input" warning - message is displayed while running few RAS commands. + [SRU] powerpc-utils commans exhibits "command substitution: ignored null + byte in input" warning message |
Changed in ubuntu-power-systems: | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
summary: |
- [SRU] powerpc-utils commans exhibits "command substitution: ignored null - byte in input" warning message + [SRU] powerpc-utils commands exhibits "command substitution: ignored + null byte in input" warning message |
Changed in powerpc-utils (Ubuntu Zesty): | |
status: | New → In Progress |
importance: | Undecided → Medium |
tags: |
added: triage-g removed: triage-r |
Changed in ubuntu-power-systems: | |
status: | New → Fix Committed |
tags: | added: id-5971d05a2dbce21bf929e27b |
tags: |
added: verification-failed verification-failed-zesty removed: verification-needed verification-needed-zesty |
Changed in powerpc-utils (Ubuntu): | |
status: | Fix Released → Triaged |
Changed in powerpc-utils (Ubuntu Zesty): | |
status: | Fix Committed → Won't Fix |
Changed in powerpc-utils (Ubuntu): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Adam Conrad (adconrad) |
Changed in ubuntu-power-systems: | |
status: | Fix Committed → Triaged |
tags: | added: triage-a |
Changed in ubuntu-power-systems: | |
status: | Triaged → Fix Released |
Default Comment by Bridge