Skip to content

[bug] A panic can sometimes occur when parsing a ill-formed ACE binary data #30

@p0dalirius

Description

@p0dalirius

A panic can sometimes occur when parsing a ill-formed ACE binary data:

panic: runtime error: slice bounds out of range [4:0]

goroutine 1 [running]:
github.com/TheManticoreProject/winacl/ace.(*AccessControlEntry).Unmarshal(0xc00016f3a8, {0xc0001a4b84, 0x44, 0x4c})
	/root/go/pkg/mod/github.com/!the!manticore!project/winacl@v1.2.10/ace/AccessControlEntry.go:45 +0x156a
github.com/TheManticoreProject/winacl/acl.(*DiscretionaryAccessControlList).Unmarshal(0xc00016f8c0, {0xc0001a4b7c, 0x4c, 0x54})
	/root/go/pkg/mod/github.com/!the!manticore!project/winacl@v1.2.10/acl/DiscretionaryAccessControlList.go:39 +0x165
github.com/TheManticoreProject/winacl/securitydescriptor.(*NtSecurityDescriptor).Unmarshal(0xc00016f720, {0xc0001a4b60?, 0x68?, 0x1?})
	/root/go/pkg/mod/github.com/!the!manticore!project/winacl@v1.2.10/securitydescriptor/NtSecurityDescriptor.go:73 +0x30b
github.com/TheManticoreProject/Delegations/core/mode_audit.AuditRessourceBasedConstrainedDelegations({0x7ffd4caa931e?, 0xf?}, 0x7ffd4caa9343?, 0xd?, 0x54?, 0x93?, 0xaa?)
	/workspace/core/mode_audit/RessourceBasedConstrainedDelegations.go:73 +0x750
main.main()
	/workspace/main.go:649 +0x935

This should return a parsing error not a panic

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions