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.