icmp_redirect from selftests fails on F/kvm (unary operator expected)

Bug #1938964 reported by Kelsey Steele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin
linux (Ubuntu)
Fix Released
Undecided
Po-Hsu Lin
Focal
Fix Released
Undecided
Po-Hsu Lin
Hirsute
Won't Fix
Undecided
Po-Hsu Lin
Impish
Fix Released
Undecided
Po-Hsu Lin
Jammy
Fix Released
Undecided
Po-Hsu Lin
linux-oem-5.10 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Won't Fix
Undecided
Unassigned
Hirsute
Invalid
Undecided
Unassigned
Impish
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned

Bug Description

[Impact]
If any sub-test in this icmp_redirect.sh is failing but not expected
to fail. The script will complain:
    ./icmp_redirect.sh: line 72: [: 1: unary operator expected

This is because when the sub-test is not expected to fail, we won't
pass any value for the xfail local variable in log_test() and thus
it's empty. Fix this by passing 0 as the 4th variable to log_test()
for non-xfail cases.

This issue can be found on our KVM kernel with SRU tests, they're
failing because of missing some kernel configs.

[Fix]
* 39d8622c72 "selftests: icmp_redirect: pass xfail=0 to log_test()"

This patch can be cherry-picked into all of the affected kernels.

[Test Plan]
Run the patched icmp_redirect.sh script with a KVM kernel (e.g. F/kvm),
and this "unary operator expected" error message should no longer exist.

[Where problems could occur]
Change limited to test script, it won't have any impact to real kernel
function. And this issue is most likely specific to KVM kernels.

== Original Bug Report ==
icmp_redirect from selftect is failing on F/kvm 5.4.0-1045.47

 # selftests: net: icmp_redirect.sh
 #
 # ###########################################################################
 # Legacy routing
 # ###########################################################################
 #
 # TEST: IPv4: redirect exception [ OK ]
 # TEST: IPv6: redirect exception [ OK ]
 # TEST: IPv4: redirect exception plus mtu [ OK ]
 # TEST: IPv6: redirect exception plus mtu [ OK ]
 # TEST: IPv4: routing reset [ OK ]
 # TEST: IPv6: routing reset [ OK ]
 # TEST: IPv4: mtu exception [ OK ]
 # TEST: IPv6: mtu exception [ OK ]
 # TEST: IPv4: mtu exception plus redirect [ OK ]
 # TEST: IPv6: mtu exception plus redirect [XFAIL]
 #
 # ###########################################################################
 # Legacy routing with VRF
 # ###########################################################################
 #
 # Error: Unknown device type.
 # Cannot find device "red"
 # Error: argument "red" is wrong: Invalid VRF
 #
 # Error: argument "red" is wrong: Invalid VRF
 #
 # Cannot find device "red"
 # Cannot find device "red"
 # Error: argument "red" is wrong: Not a valid VRF name
 #
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: redirect exception [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: redirect exception [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: redirect exception plus mtu [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: redirect exception plus mtu [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: routing reset [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: routing reset [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: mtu exception [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: mtu exception [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: mtu exception plus redirect [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: mtu exception plus redirect [XFAIL]
 #
 # ###########################################################################
 # Routing with nexthop objects
 # ###########################################################################
 #
 # TEST: IPv4: redirect exception [ OK ]
 # TEST: IPv6: redirect exception [ OK ]
 # TEST: IPv4: redirect exception plus mtu [ OK ]
 # TEST: IPv6: redirect exception plus mtu [ OK ]
 # TEST: IPv4: routing reset [ OK ]
 # TEST: IPv6: routing reset [ OK ]
 # TEST: IPv4: mtu exception [ OK ]
 # TEST: IPv6: mtu exception [ OK ]
 # TEST: IPv4: mtu exception plus redirect [ OK ]
 # TEST: IPv6: mtu exception plus redirect [XFAIL]
 #
 # ###########################################################################
 # Routing with nexthop objects and VRF
 # ###########################################################################
 #
 # Error: Unknown device type.
 # Cannot find device "red"
 # Error: argument "red" is wrong: Invalid VRF
 #
 # Error: argument "red" is wrong: Invalid VRF
 #
 # Cannot find device "red"
 # Cannot find device "red"
 # Error: argument "red" is wrong: Not a valid VRF name
 #
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: redirect exception [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: redirect exception [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: redirect exception plus mtu [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: redirect exception plus mtu [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: routing reset [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: routing reset [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: mtu exception [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: mtu exception [XFAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # ./icmp_redirect.sh: line 71: [: 1: unary operator expected
 # TEST: IPv4: mtu exception plus redirect [FAIL]
 # Error: argument "red" is wrong: Invalid VRF
 #
 # TEST: IPv6: mtu exception plus redirect [XFAIL]
 #
 # Tests passed: 18
 # Tests failed: 10
 # Tests xfailed: 12
 not ok 35 selftests: net: icmp_redirect.sh # exit=1

CVE References

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Found on Focal ibm 5.4.0-1007.8

description: updated
summary: - icmp_redirect from selftests fails on F/kvm
+ icmp_redirect from selftests fails on F/kvm (unary operator expected)
tags: added: sru-20211018
tags: added: ibm
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

https://<email address hidden>/T/#u

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1938964

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Po-Hsu Lin (cypressyew)
description: updated
Changed in linux (Ubuntu Focal):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Hirsute):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Impish):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Jammy):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Focal):
status: New → In Progress
Changed in linux (Ubuntu Hirsute):
status: New → In Progress
Changed in linux (Ubuntu Impish):
status: New → In Progress
Changed in linux (Ubuntu Jammy):
status: Incomplete → In Progress
description: updated
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Impish):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Hirsute):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.13.0-24.24 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-impish' to 'verification-done-impish'. If the problem still exists, change the tag 'verification-needed-impish' to 'verification-failed-impish'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-impish
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.11.0-47.52 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-hirsute' to 'verification-done-hirsute'. If the problem still exists, change the tag 'verification-needed-hirsute' to 'verification-failed-hirsute'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-hirsute
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Patch already applied on Jammy

Changed in linux (Ubuntu Jammy):
status: In Progress → Fix Released
AceLan Kao (acelankao)
Changed in linux-oem-5.10 (Ubuntu Focal):
status: New → Fix Committed
Changed in linux-oem-5.10 (Ubuntu Hirsute):
status: New → Invalid
Changed in linux-oem-5.10 (Ubuntu Impish):
status: New → Invalid
Changed in linux-oem-5.10 (Ubuntu Jammy):
status: New → Invalid
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.4.0-97.110 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

Verified "unary operator expected" error is not showing on any kvm selftests results for the kernels in -proposed. Thank you!

tags: added: verification-done-focal verification-done-hirsute verification-done-impish
removed: verification-needed-focal verification-needed-hirsute verification-needed-impish
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (31.9 KiB)

This bug was fixed in the package linux - 5.4.0-97.110

---------------
linux (5.4.0-97.110) focal; urgency=medium

  * icmp_redirect from selftests fails on F/kvm (unary operator expected)
    (LP: #1938964)
    - selftests: icmp_redirect: pass xfail=0 to log_test()

  * Focal: CIFS stable updates (LP: #1954926)
    - cifs: use the expiry output of dns_query to schedule next resolution
    - cifs: set a minimum of 120s for next dns resolution
    - cifs: To match file servers, make sure the server hostname matches

  * seccomp_bpf in seccomp from ubuntu_kernel_selftests failed to build on B-5.4
    (LP: #1896420)
    - SAUCE: selftests/seccomp: fix "storage size of 'md' isn't known" build issue
    - SAUCE: selftests/seccomp: Fix s390x regs not defined issue

  * system crash when removing ipmi_msghandler module (LP: #1950666)
    - ipmi: Move remove_work to dedicated workqueue
    - ipmi: msghandler: Make symbol 'remove_work_wq' static

  * zcrypt DD: Toleration for new IBM Z Crypto Hardware - (Backport to Ubuntu
    20.04) (LP: #1954680)
    - s390/AP: support new dynamic AP bus size limit

  * [UBUNTU 20.04] KVM hardware diagnose data improvements for guest kernel -
    kernel part (LP: #1953334)
    - s390/setup: diag 318: refactor struct
    - s390/kvm: diagnose 0x318 sync and reset
    - KVM: s390: remove diag318 reset code
    - KVM: s390: add debug statement for diag 318 CPNC data

  * Updates to ib_peer_memory requested by Nvidia (LP: #1947206)
    - SAUCE: RDMA/core: Updated ib_peer_memory

  * Include Infiniband Peer Memory interface (LP: #1923104)
    - IB: Allow calls to ib_umem_get from kernel ULPs
    - SAUCE: RDMA/core: Introduce peer memory interface

  * Focal update: v5.4.162 upstream stable release (LP: #1954834)
    - arm64: zynqmp: Do not duplicate flash partition label property
    - arm64: zynqmp: Fix serial compatible string
    - ARM: dts: NSP: Fix mpcore, mmc node names
    - scsi: lpfc: Fix list_add() corruption in lpfc_drain_txq()
    - arm64: dts: hisilicon: fix arm,sp805 compatible string
    - RDMA/bnxt_re: Check if the vlan is valid before reporting
    - usb: musb: tusb6010: check return value after calling
      platform_get_resource()
    - usb: typec: tipd: Remove WARN_ON in tps6598x_block_read
    - arm64: dts: qcom: msm8998: Fix CPU/L2 idle state latency and residency
    - arm64: dts: freescale: fix arm,sp805 compatible string
    - ASoC: SOF: Intel: hda-dai: fix potential locking issue
    - clk: imx: imx6ul: Move csi_sel mux to correct base register
    - ASoC: nau8824: Add DMI quirk mechanism for active-high jack-detect
    - scsi: advansys: Fix kernel pointer leak
    - firmware_loader: fix pre-allocated buf built-in firmware use
    - ARM: dts: omap: fix gpmc,mux-add-data type
    - usb: host: ohci-tmio: check return value after calling
      platform_get_resource()
    - ARM: dts: ls1021a: move thermal-zones node out of soc/
    - ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash
    - ALSA: ISA: not for M68K
    - tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc
    - MIPS: sni: Fix the build
    - scsi: target: Fix ordered tag handling
    - scsi: target: Fix al...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (74.6 KiB)

This bug was fixed in the package linux - 5.13.0-28.31

---------------
linux (5.13.0-28.31) impish; urgency=medium

  * amd_sfh: Null pointer dereference on early device init causes early panic
    and fails to boot (LP: #1956519)
    - HID: amd_sfh: Fix potential NULL pointer dereference

  * impish: ddebs build take too long and times out (LP: #1957810)
    - [Packaging] enforce xz compression for ddebs

  * audio mute/ mic mute are not working on a HP machine (LP: #1955691)
    - ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook

  * rtw88_8821ce causes freeze (LP: #1927808)
    - rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE

  * alsa/sdw: fix the audio sdw codec parsing logic in the acpi table
    (LP: #1955686)
    - ALSA: hda: intel-sdw-acpi: harden detection of controller
    - ALSA: hda: intel-sdw-acpi: go through HDAS ACPI at max depth of 2

  * icmp_redirect from selftests fails on F/kvm (unary operator expected)
    (LP: #1938964)
    - selftests: icmp_redirect: pass xfail=0 to log_test()

  * Impish update: upstream stable patchset 2021-12-17 (LP: #1955180)
    - arm64: zynqmp: Do not duplicate flash partition label property
    - arm64: zynqmp: Fix serial compatible string
    - ARM: dts: sunxi: Fix OPPs node name
    - arm64: dts: allwinner: h5: Fix GPU thermal zone node name
    - arm64: dts: allwinner: a100: Fix thermal zone node name
    - staging: wfx: ensure IRQ is ready before enabling it
    - ARM: dts: NSP: Fix mpcore, mmc node names
    - scsi: lpfc: Fix list_add() corruption in lpfc_drain_txq()
    - arm64: dts: rockchip: Disable CDN DP on Pinebook Pro
    - arm64: dts: hisilicon: fix arm,sp805 compatible string
    - RDMA/bnxt_re: Check if the vlan is valid before reporting
    - bus: ti-sysc: Add quirk handling for reinit on context lost
    - bus: ti-sysc: Use context lost quirk for otg
    - usb: musb: tusb6010: check return value after calling
      platform_get_resource()
    - usb: typec: tipd: Remove WARN_ON in tps6598x_block_read
    - ARM: dts: ux500: Skomer regulator fixes
    - staging: rtl8723bs: remove possible deadlock when disconnect (v2)
    - ARM: BCM53016: Specify switch ports for Meraki MR32
    - arm64: dts: qcom: msm8998: Fix CPU/L2 idle state latency and residency
    - arm64: dts: qcom: ipq6018: Fix qcom,controlled-remotely property
    - arm64: dts: freescale: fix arm,sp805 compatible string
    - ASoC: SOF: Intel: hda-dai: fix potential locking issue
    - clk: imx: imx6ul: Move csi_sel mux to correct base register
    - ASoC: nau8824: Add DMI quirk mechanism for active-high jack-detect
    - scsi: advansys: Fix kernel pointer leak
    - ALSA: intel-dsp-config: add quirk for APL/GLK/TGL devices based on ES8336
      codec
    - firmware_loader: fix pre-allocated buf built-in firmware use
    - ARM: dts: omap: fix gpmc,mux-add-data type
    - usb: host: ohci-tmio: check return value after calling
      platform_get_resource()
    - ARM: dts: ls1021a: move thermal-zones node out of soc/
    - ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash
    - ALSA: ISA: not for M68K
    - tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc
    - MIPS: sni:...

Changed in linux (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-ibm-5.4/5.4.0-1014.15~18.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This test is not failing with "unary operator expected" anymore on B-ibm-5.4.0-1015.16~18.04.1

tags: added: verification-done-bionic
removed: verification-needed-bionic
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Mark unsupported series as Won't fix.

Changed in linux (Ubuntu Hirsute):
status: Fix Committed → Won't Fix
Changed in linux-oem-5.10 (Ubuntu Focal):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.