Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix memory corruption #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rm-medina
Copy link

The current commit fixes an invalid memory access
which manifests as a random segfault when executing
continuous tag read operations.

The corruption happens when releasing the memory allocated to a
record: in the time between the memory being g_free'd and the
subsequent memset operation, the memory could have been reused by
some other process. And since memory allocation depends on
system-wide factors, it makes this bug hard to track.

Tested using ACR122U reader and NTAG213
tags on Automotive Grade Linux (flounder,
guppy and master branches)

Signed-off-by: Raquel Medina raquel.medina@konsulko.com

 The current commit fixes an invalid memory  access
 which manifests as a random segfault  when executing
 continuous tag read operations.

 The corruption happens when releasing the  memory allocated to a
 record: in the time between  the memory being g_free'd and the
 subsequent memset  operation, the memory could have been reused by
 some  other process. And since memory allocation  depends on
 system-wide factors, it makes this bug hard to track.

 Tested using ACR122U reader and NTAG213
 tags on Automotive Grade Linux (flounder,
 guppy and master branches)

Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant