Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • wireshark wireshark
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 1,352
    • Issues 1,352
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 183
    • Merge requests 183
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Wireshark FoundationWireshark Foundation
  • wiresharkwireshark
  • Issues
  • #18702
Closed
Open
Issue created Dec 05, 2022 by romeost@romeost

Wrong number of bits skipped while decoding an empty UTF8String on UPER packet

Summary

If a PER packet contains an empty UTF8 string, the offset is skipped by 9 bits instead of 8, resulting on wrong decoding of subsequent fields.

Steps to reproduce

Dissect a packet containing an empty (null-termination char only) UTF8 string.

What is the current bug behavior?

What is the expected correct behavior?

(What you should see instead)

Sample capture file

Relevant logs and/or screenshots

On dissect_per_restricted_character_string_sorted, the string length is checked and one bit is skipped in case it is 0 to point to the next element. However, the offset is already advanced by 8 bits from the calling dissect_per_length_determinant function. On my private build, saving the offset prior to calling dissect_per_length_determinant and checking if any bits were skipped (instead of the string length) has solved the issue.

Build information

(In Wireshark, select Help->About Wireshark from the main menu and use the button "Copy To Clipboard". Please paste the complete output here. Or from the command line, run `tshark -v` or `wireshark -v`)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking