Skip to content

Invalid log level #60

Description

@danigm

In "src/efi.c" the function "log_append()" is called with a log level "LOG_DEBUG", but the corresponding function in "src/dmilog.c" only allows "LOG_ERR" and "LOG_WARNING". This bug was introduced with a commit in 2022.

Here you can find a reproducer script:

import dmidecode

def replicate_bug():
    # Among other things, this reads BIOS information, thereby
    # triggering python-dmidecode to read /sys/firmware/efi/systab
    try:
        bios_info = dmidecode.bios()
        print("Successfully retrieved BIOS information.")
#        for entry in bios_info.values():
#            print(entry)
    except Exception as e:
        print(f"An error occurred while retrieving the BIOS information: {e}")

if __name__ == "__main__":
    replicate_bug()

This script will produce the following output:

** ERROR **  Failed to save log entry
SMBIOS3: entry point at 0xc7c59000
Successfully retrieved BIOS information.

** COLLECTED WARNINGS **
Wrong DMI structures count: 0 announced, only 68 decoded.
** END OF WARNINGS **

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions