Skip to content

Don't zero out origin of uninitialized bytes in kmsan_internal_set_shadow_origin() #70

@ramosian-glider

Description

@ramosian-glider

The following test:

char buf[4];
kmsan_unpoison_shadow(buf, 1);
kmsan_check_memory(buf, 4);

doesn't report any errors.
This could be related to kmsan_unpoison_shadow() zeroing out the origin despite there still are uninitialized bytes.
We must only zero out an origin iff the shadow is also zeroed out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions