Skip to content

Buffer overrun in sample ASL #85

@nv-epg

Description

@nv-epg

Noting this excerpt from the code block under Secure eSPI Read:

Method (_BST) {
    // *snip*
    Name(BUFF, Buffer(32){}) // Create buffer for send/recv data
    // *snip*
    CreateByteField(BUFF,18, CMDD) // In – First byte of command
    CreateDwordField(BUFF,19, BMA1) // In – Averaging Interval
    CreateField(BUFF,144,128,BSTD) // Out – 4 DWord BST data
    // *snip*
}

BUFF is 32 bytes, buf BSTD overflows into bytes 32-33. The comments make it pretty clear that BSTD is intended to be 4 DWORDs, so the length is correct. Is BUFF supposed to be 34 bytes long?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions