From f3a13486f44fa4ae5261f90397ce963c58f71fff Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 4 Feb 2020 14:42:15 +0000 Subject: [PATCH] Revert "Merge pull request #3012 from Patater/dev/jp-bennett/development-2.16" This reverts commit 7550e857bf85bc169271b9edefb1e8ee04bc3042, reversing changes made to d0c25753241b0ea2b120bfa506d558f76c8c1430. stat() will never return S_IFLNK as the file type, as stat() explicitly follows symlinks. Fixes #3005. --- ChangeLog | 4 ++-- library/x509_crt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09c844137..2e9bf1137 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,8 @@ Changes * Reduce RAM consumption during session renegotiation by not storing the peer CRT chain and session ticket twice. += mbed TLS 2.16.X branch released XXXX-XX-XX + Security * Fix potential memory overread when performing an ECDSA signature operation. The overread only happens with cryptographically low @@ -77,8 +79,6 @@ Security ARMmbed/mbed-crypto#352 Bugfix - * Allow loading symlinked certificates. Fixes #3005. Reported and fixed - by Jonathan Bennett via #3008. * Fix an unchecked call to mbedtls_md() in the x509write module. = mbed TLS 2.16.4 branch released 2020-01-15 diff --git a/library/x509_crt.c b/library/x509_crt.c index b09a5be54..af8f1d67f 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -2023,7 +2023,7 @@ cleanup: goto cleanup; } - if( !( S_ISREG( sb.st_mode ) || S_ISLNK( sb.st_mode ) ) ) + if( !S_ISREG( sb.st_mode ) ) continue; // Ignore parse errors