From: Frank M. <no...@gi...> - 2024-12-11 08:54:32
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: 774d1e1d16e8bc0ec4221b2879e7a00815a6fdb1 https://github.com/OpenSC/OpenSC/commit/774d1e1d16e8bc0ec4221b2879e7a00815a6fdb1 Author: Davis Gallinghouse <da...@ar...> Date: 2024-12-11 (Wed, 11 Dec 2024) Changed paths: M src/libopensc/sc.c Log Message: ----------- Allocate whole page(s) for each sc_mem_secure_alloc sc_mem_secure_alloc uses calloc to allocate memory, but then uses mlock to try to lock the allocated memory. calloc may not necessarily return a page-aligned pointer, even if we request a whole page of memory. Instead of relying on the libc allocator behavior, we directly call mmap (VirtualAlloc on Windows) to ensure we get whole page(s) to ourselves for sc_mem_secure_alloc. Fixes #3267 Commit: 3f40397801471bc86f401d9b03b828eee0daa445 https://github.com/OpenSC/OpenSC/commit/3f40397801471bc86f401d9b03b828eee0daa445 Author: Davis Gallinghouse <da...@ar...> Date: 2024-12-11 (Wed, 11 Dec 2024) Changed paths: M src/libopensc/sc.c Log Message: ----------- Fix code style violations Commit: 3e90fd0f3504c63aba445af03da91258d9809d3e https://github.com/OpenSC/OpenSC/commit/3e90fd0f3504c63aba445af03da91258d9809d3e Author: Frank Morgner <fra...@gm...> Date: 2024-12-11 (Wed, 11 Dec 2024) Changed paths: M src/libopensc/pkcs15.c M src/libopensc/pkcs15.h Log Message: ----------- fixed usage of free() on data that was created with sc_mem_secure_alloc This will crash applications, which, for example are importing a private key as reported here https://github.com/OpenSC/OpenSC/pull/3269#issuecomment-2495074344 Compare: https://github.com/OpenSC/OpenSC/compare/0df13ee6a1c7...3e90fd0f3504 To unsubscribe from these emails, change your notification settings at https://github.com/OpenSC/OpenSC/settings/notifications |