Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2099364

Summary: Fix buffer overflow on large labels [rhel-8.6.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: iprouteAssignee: Andrea Claudi <aclaudi>
Status: CLOSED ERRATA QA Contact: Li Shuang <shuali>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: aclaudi, jiji, mleitner, network-qe, shuali
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iproute-5.15.0-4.el8_6.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2058227 Environment:
Last Closed: 2022-09-13 09:49:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2058227    
Bug Blocks:    

Comment 1 Andrea Claudi 2022-07-11 20:24:50 UTC
z-stream build available on brew: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=2083794

Comment 2 Li Shuang 2022-07-12 12:22:03 UTC
Reproduced with iproute-tc-5.15.0-4.el8.x86_64:
# sh repro.sh 
+ rmmod veth
+ ip link add type veth
+ rep1=veth0
+ rep2=veth1
+ ct_label=12345678123456781234567812345678/12345678123456781234567812345678
+ tc qdisc add dev veth0 ingress
+ tc qdisc add dev veth1 ingress
+ tc filter add dev veth0 ingress prio 1 chain 0 protocol arp flower action mirred egress redirect dev veth1
+ tc filter add dev veth1 ingress prio 1 chain 0 protocol arp flower action mirred egress redirect dev veth0
+ tc filter add dev veth0 ingress prio 2 chain 0 protocol ip flower ct_state -trk action ct action goto chain 1
+ tc filter add dev veth1 ingress prio 2 chain 0 protocol ip flower ct_state -trk action ct action goto chain 1
+ tc filter add dev veth0 ingress prio 1 chain 1 protocol ip flower ct_state +trk+new action ct label 12345678123456781234567812345678/12345678123456781234567812345678 commit action mirred egress redirect dev veth1
+ tc filter add dev veth1 ingress prio 1 chain 1 protocol ip flower ct_state +trk+new action ct label 12345678123456781234567812345678/12345678123456781234567812345678 commit action mirred egress redirect dev veth0
+ tc filter add dev veth0 ingress prio 1 chain 1 protocol ip flower ct_state +trk+est ct_label 12345678123456781234567812345678/12345678123456781234567812345678 action mirred egress redirect dev veth1
+ tc filter add dev veth1 ingress prio 1 chain 1 protocol ip flower ct_state +trk+est ct_label 12345678123456781234567812345678/12345678123456781234567812345678 action mirred egress redirect dev veth0
+ tc -s filter show dev veth0 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth1) stolen
	index 1 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 2 flower chain 0 
filter protocol ip pref 2 flower chain 0 handle 0x1 
  eth_type ipv4
  ct_state -trk
  not_in_hw
	action order 1: ct zone 0 pipe
	 index 1 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: gact action goto chain 1
	 random type none pass val 0
	 index 1 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 
filter protocol ip pref 1 flower chain 1 handle 0x1 
  eth_type ipv4
  ct_state +trk+new
  not_in_hw
	action order 1: ct commit zone 0 label 12345678123456781234567812345678/12345678123456781234567812345678 pipe
	 index 3 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: mirred (Egress Redirect to device veth1) stolen
	index 3 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 handle 0x2 
  eth_type ipv4
  ct_state +trk+est
  ct_label 12345678123456781234567812345678/123456781234567812345678123456   <---   incomplete ct_label mask due to buffer overflow
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth1) stolen
	index 5 ref 1 bind 1
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

+ tc -s filter show dev veth1 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth0) stolen
	index 2 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 2 flower chain 0 
filter protocol ip pref 2 flower chain 0 handle 0x1 
  eth_type ipv4
  ct_state -trk
  not_in_hw
	action order 1: ct zone 0 pipe
	 index 2 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: gact action goto chain 1
	 random type none pass val 0
	 index 2 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 
filter protocol ip pref 1 flower chain 1 handle 0x1 
  eth_type ipv4
  ct_state +trk+new
  not_in_hw
	action order 1: ct commit zone 0 label 12345678123456781234567812345678/12345678123456781234567812345678 pipe
	 index 4 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: mirred (Egress Redirect to device veth0) stolen
	index 4 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 handle 0x2 
  eth_type ipv4
  ct_state +trk+est
  ct_label 12345678123456781234567812345678/123456781234567812345678123456   <---   incomplete ct_label mask due to buffer overflow
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth0) stolen
	index 6 ref 1 bind 1
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

+ tc qdisc del dev veth0 ingress
+ tc qdisc del dev veth1 ingress
# rpm -q iproute-tc
iproute-tc-5.15.0-4.el8.x86_64

Verified with iproute-tc-5.15.0-4.el8_6.1.x86_64:
# sh repro.sh 
+ rmmod veth
+ ip link add type veth
+ rep1=veth0
+ rep2=veth1
+ ct_label=12345678123456781234567812345678/12345678123456781234567812345678
+ tc qdisc add dev veth0 ingress
+ tc qdisc add dev veth1 ingress
+ tc filter add dev veth0 ingress prio 1 chain 0 protocol arp flower action mirred egress redirect dev veth1
+ tc filter add dev veth1 ingress prio 1 chain 0 protocol arp flower action mirred egress redirect dev veth0
+ tc filter add dev veth0 ingress prio 2 chain 0 protocol ip flower ct_state -trk action ct action goto chain 1
+ tc filter add dev veth1 ingress prio 2 chain 0 protocol ip flower ct_state -trk action ct action goto chain 1
+ tc filter add dev veth0 ingress prio 1 chain 1 protocol ip flower ct_state +trk+new action ct label 12345678123456781234567812345678/12345678123456781234567812345678 commit action mirred egress redirect dev veth1
+ tc filter add dev veth1 ingress prio 1 chain 1 protocol ip flower ct_state +trk+new action ct label 12345678123456781234567812345678/12345678123456781234567812345678 commit action mirred egress redirect dev veth0
+ tc filter add dev veth0 ingress prio 1 chain 1 protocol ip flower ct_state +trk+est ct_label 12345678123456781234567812345678/12345678123456781234567812345678 action mirred egress redirect dev veth1
+ tc filter add dev veth1 ingress prio 1 chain 1 protocol ip flower ct_state +trk+est ct_label 12345678123456781234567812345678/12345678123456781234567812345678 action mirred egress redirect dev veth0
+ tc -s filter show dev veth0 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth1) stolen
	index 1 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 2 flower chain 0 
filter protocol ip pref 2 flower chain 0 handle 0x1 
  eth_type ipv4
  ct_state -trk
  not_in_hw
	action order 1: ct zone 0 pipe
	 index 1 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: gact action goto chain 1
	 random type none pass val 0
	 index 1 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 
filter protocol ip pref 1 flower chain 1 handle 0x1 
  eth_type ipv4
  ct_state +trk+new
  not_in_hw
	action order 1: ct commit zone 0 label 12345678123456781234567812345678/12345678123456781234567812345678 pipe
	 index 3 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: mirred (Egress Redirect to device veth1) stolen
	index 3 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 handle 0x2 
  eth_type ipv4
  ct_state +trk+est
  ct_label 12345678123456781234567812345678/12345678123456781234567812345678   <---   complete ct_label mask
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth1) stolen
	index 5 ref 1 bind 1
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

+ tc -s filter show dev veth1 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth0) stolen
	index 2 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 2 flower chain 0 
filter protocol ip pref 2 flower chain 0 handle 0x1 
  eth_type ipv4
  ct_state -trk
  not_in_hw
	action order 1: ct zone 0 pipe
	 index 2 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: gact action goto chain 1
	 random type none pass val 0
	 index 2 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 
filter protocol ip pref 1 flower chain 1 handle 0x1 
  eth_type ipv4
  ct_state +trk+new
  not_in_hw
	action order 1: ct commit zone 0 label 12345678123456781234567812345678/12345678123456781234567812345678 pipe
	 index 4 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

	action order 2: mirred (Egress Redirect to device veth0) stolen
	index 4 ref 1 bind 1 installed 0 sec used 0 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

filter protocol ip pref 1 flower chain 1 handle 0x2 
  eth_type ipv4
  ct_state +trk+est
  ct_label 12345678123456781234567812345678/12345678123456781234567812345678   <---   complete ct_label mask
  not_in_hw
	action order 1: mirred (Egress Redirect to device veth0) stolen
	index 6 ref 1 bind 1
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0

+ tc qdisc del dev veth0 ingress
+ tc qdisc del dev veth1 ingress
# rpm -q iproute-tc
iproute-tc-5.15.0-4.el8_6.1.x86_64

Comment 10 errata-xmlrpc 2022-09-13 09:49:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (iproute bug fix and enhacement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:6458