lkml.org 
[lkml]   [2017]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [Linux-ima-devel] [PATCH 0/7] IMA: new parser for ima_restore_measurement_list()
    From
    Date
    On 5/17/2017 6:28 PM, Ken Goldman wrote:
    > On 5/17/2017 3:25 AM, Roberto Sassu wrote:
    >>
    >> The format of digestN is: <algo name>:\0<digest value>, the same used
    >> for the file digest.
    >
    > Since the format is changing from the SHA-1 log format anyway ...
    >
    > How do people feel about the colon and null terminated string format for
    > algorithm identifiers?
    >
    > The TCG standard enumerations are uint16_t, and there is a registry of
    > hash algorithms.
    >
    > As a consuming parser, it feels nice to know it's always 2 bytes and not
    > have to worry about a missing colon or a missing nul terminator risking
    > a buffer overflow.

    There cannot be buffer overflow, because the length of each digest
    field is known.

    Roberto

    \
     
     \ /
      Last update: 2017-05-18 11:39    [W:3.956 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site