DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/cryptodev Bug 1537] Failure to enqueue packets for cryptodev-scheduler_multicore can lead to program crashes
@ 2024-09-09  8:58 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2024-09-09  8:58 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2198 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1537

            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=288&action=edit
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 content
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 always
returns a value of `processed_ops` that is less than `pending_enq_ops`, leading
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 4219 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-09  8:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09  8:58 [DPDK/cryptodev Bug 1537] Failure to enqueue packets for cryptodev-scheduler_multicore can lead to program crashes bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).