Project

General

Profile

Actions

Bug #6280

closed

Optimization #7065: base64: move the decoder to rust

base64: strict mode should only accept strings that can be reliably converted back

Added by Shivani Bhardwaj about 1 year ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

A string such as D=aB is invalid and should be rejected by the parser.
More strings that should be rejected from the conversation on https://github.com/OISF/suricata/pull/11195 thanks to catenacyber
====
@X===

D=


Related issues 1 (0 open1 closed)

Related to Suricata - Task #7058: fuzz/base64: check decoded strings for correctness in strict modeClosedShivani BhardwajActions
Actions #1

Updated by Shivani Bhardwaj 7 months ago

  • Target version changed from TBD to 8.0.0-beta1

This needs a decision. Our parser would accept such a string in all modes as the string does not have any non base64 alphabet. On popular base64 decoders as well such a string is accepted but it is rejected by some parsers like Python's base64 library as it is incorrect to have padding bytes in the middle of a string.

Actions #2

Updated by Shivani Bhardwaj 7 months ago

@Philippe Antoine what do you think about this issue?

Actions #3

Updated by Philippe Antoine 7 months ago

Should be rejected in strict mode, not in others if it is accepted by popular base64 decoders

Actions #4

Updated by Shivani Bhardwaj 6 months ago ยท Edited

  • Status changed from Assigned to In Review
Actions #5

Updated by Shivani Bhardwaj 6 months ago

  • Subject changed from base64: don't accept = in the middle of a string to base64: strict mode should only accept strings that can be reliably converted back
Actions #6

Updated by Shivani Bhardwaj 6 months ago

  • Description updated (diff)
Actions #7

Updated by Shivani Bhardwaj 6 months ago

  • Related to Task #7058: fuzz/base64: check decoded strings for correctness in strict mode added
Actions #8

Updated by Shivani Bhardwaj 5 months ago

  • Parent task set to #7065
Actions #9

Updated by Shivani Bhardwaj about 2 months ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF