From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
by inbox.dpdk.org (Postfix) with ESMTP id AC42745948;
Mon, 9 Sep 2024 10:58:48 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 4FB25402BB;
Mon, 9 Sep 2024 10:58:48 +0200 (CEST)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
by mails.dpdk.org (Postfix) with ESMTP id DCC7440299
for ; Mon, 9 Sep 2024 10:58:46 +0200 (CEST)
Received: by inbox.dpdk.org (Postfix, from userid 33)
id C9A7B45949; Mon, 9 Sep 2024 10:58:46 +0200 (CEST)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/cryptodev Bug 1537] Failure to enqueue packets for
cryptodev-scheduler_multicore can lead to program crashes
Date: Mon, 09 Sep 2024 08:58:46 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: cryptodev
X-Bugzilla-Version: 22.11
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: 1269690261@qq.com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
op_sys bug_status bug_severity priority component assigned_to reporter
target_milestone attachments.created
Message-ID:
Content-Type: multipart/alternative; boundary=17258723260.a35a.3429215
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
--17258723260.a35a.3429215
Date: Mon, 9 Sep 2024 10:58:46 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
https://bugs.dpdk.org/show_bug.cgi?id=3D1537
Bug ID: 1537
Summary: Failure to enqueue packets for
cryptodev-scheduler_multicore can lead to program
crashes
Product: DPDK
Version: 22.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: critical
Priority: Normal
Component: cryptodev
Assignee: dev@dpdk.org
Reporter: 1269690261@qq.com
Target Milestone: ---
Created attachment 288
--> https://bugs.dpdk.org/attachment.cgi?id=3D288&action=3Dedit
Incorrect Variable Usage
Failure Scenario:
The `cryptodev` scheduler is running in Multi-core mode, with OpenSSL PMD
attached as workers.
When a batch of packets to be enqueued contains invalid encrypted ESP
(Encapsulating Security Payload) packets, the program crashes.
---------------------------------
Specific Issues:
1. Incorrect Variable Usage:
- The variable `pending_deq_ops` was incorrectly used instead of
`pending_enq_ops`. This leads to failed condition checks and prevents the
`scheduler_retrieve_session` function from executing. Consequently, the con=
tent
of the `op->sym->session` variable becomes abnormal, causing the program to
crash when the OpenSSL PMD accesses this variable.
2. Lack of Exception Handling:
- There is no handling for exceptional cases when enqueuing packets. When
invalid packets are enqueued, the `rte_cryptodev_enqueue_burst` function al=
ways
returns a value of `processed_ops` that is less than `pending_enq_ops`, lea=
ding
the program into an infinite retry loop.
--------------------------------
Resolution Suggestions:
1. Correct Variable Usage:
- In the faulty code, replace `pending_deq_ops` with `pending_enq_ops`.
2. Documentation Update:
- Add documentation stating that packets should always be added to the
processed operations queue in the worker PMD.
- Alternatively, implement a maximum retry count check to prevent the
program from entering an infinite retry loop.
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--17258723260.a35a.3429215
Date: Mon, 9 Sep 2024 10:58:46 +0200
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
Failure to enqueue packets for cryptodev-scheduler_multicore =
can lead to program crashes
Product
DPDK
Version
22.11
Hardware
All
OS
All
Status
UNCONFIRMED
Severity
critical
Priority
Normal
Component
cryptodev
Assignee
dev@dpdk.org
Reporter
1269690261@qq.com
Target Milestone
---
Created attachment 288[details]
Incorrect Variable Usage
Failure Scenario:
The `cryptodev` scheduler is running in Multi-core mode, with OpenSSL PMD
attached as workers.
When a batch of packets to be enqueued contains invalid encrypted ESP
(Encapsulating Security Payload) packets, the program crashes.
---------------------------------
Specific Issues:
1. Incorrect Variable Usage:
- The variable `pending_deq_ops` was incorrectly used instead of
`pending_enq_ops`. This leads to failed condition checks and prevents the
`scheduler_retrieve_session` function from executing. Consequently, the con=
tent
of the `op->sym->session` variable becomes abnormal, causing the prog=
ram to
crash when the OpenSSL PMD accesses this variable.
2. Lack of Exception Handling:
- There is no handling for exceptional cases when enqueuing packets. When
invalid packets are enqueued, the `rte_cryptodev_enqueue_burst` function al=
ways
returns a value of `processed_ops` that is less than `pending_enq_ops`, lea=
ding
the program into an infinite retry loop.
--------------------------------
Resolution Suggestions:
1. Correct Variable Usage:
- In the faulty code, replace `pending_deq_ops` with `pending_enq_ops`.
2. Documentation Update:
- Add documentation stating that packets should always be added to the
processed operations queue in the worker PMD.
- Alternatively, implement a maximum retry count check to prevent the
program from entering an infinite retry loop.
Created attachment 288 [details] Incorrect Variable Usage Failure Scenario: The `cryptodev` scheduler is running in Multi-core mode, with OpenSSL PMD attached as workers. When a batch of packets to be enqueued contains invalid encrypted ESP (Encapsulating Security Payload) packets, the program crashes. --------------------------------- Specific Issues: 1. Incorrect Variable Usage: - The variable `pending_deq_ops` was incorrectly used instead of `pending_enq_ops`. This leads to failed condition checks and prevents the `scheduler_retrieve_session` function from executing. Consequently, the con= tent of the `op->sym->session` variable becomes abnormal, causing the prog= ram to crash when the OpenSSL PMD accesses this variable. 2. Lack of Exception Handling: - There is no handling for exceptional cases when enqueuing packets. When invalid packets are enqueued, the `rte_cryptodev_enqueue_burst` function al= ways returns a value of `processed_ops` that is less than `pending_enq_ops`, lea= ding the program into an infinite retry loop. -------------------------------- Resolution Suggestions: 1. Correct Variable Usage: - In the faulty code, replace `pending_deq_ops` with `pending_enq_ops`. 2. Documentation Update: - Add documentation stating that packets should always be added to the processed operations queue in the worker PMD. - Alternatively, implement a maximum retry count check to prevent the program from entering an infinite retry loop.