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

LTS Updates #562

Merged
merged 9 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,6 @@ vportgetheapstats
vportinitialiseblocks
vportisrstartfirststask
vportraisebasepri
vportresetprivilege
vportsetmpuregistersetone
vportsetuptimerinterrupt
vportstartfirststask
Expand Down Expand Up @@ -2852,7 +2851,6 @@ xperiod
xportgetcoreid
xportgetfreeheapsize
xportinstallinterrupthandler
xportraiseprivilege
xportregistercinterrupthandler
xportregisterdump
xportstartfirsttask
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/header-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Get latest checks from master
# Get latest checks from main
- name: Checkout FreeRTOS Tools
uses: actions/checkout@v2
with:
repository: FreeRTOS/FreeRTOS
ref: master
ref: main
path: tools

# Checkout user pull request changes
Expand Down
25 changes: 25 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
Documentation and download available at https://www.FreeRTOS.org/

Changes between FreeRTOS V10.4.3 LTS Patch 2 and FreeRTOS V10.4.3 LTS Patch 3 released September 16 2022

+ ARMv7-M and ARMv8-M MPU ports: It is possible for a third party that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The history file should make it clear these issues applied to the prior version. So "it was possible", rather than "is possible", as a minimum.

already independently gained the ability to execute injected code to
read from or write to arbitrary addresses by passing a negative argument
as the xIndex parameter to pvTaskGetThreadLocalStoragePointer() or
vTaskSetThreadLocalStoragePointer respectively.
We thank Certibit Consulting, LLC for reporting this issue.
+ ARMv7-M and ARMv8-M MPU ports: It is possible for an unprivileged task to
invoke any function with privilege by passing it as a parameter to
MPU_xTaskCreate, MPU_xTaskCreateStatic, MPU_xTimerCreate,
MPU_xTimerCreateStatic, or MPU_xTimerPendFunctionCall.
We thank Huazhong University of Science and Technology for reporting this issue.
+ ARMv7-M and ARMv8-M MPU ports: It is possible for a third party that has
already independently gained the ability to execute injected code to
achieve further privilege escalation by branching directly inside a
FreeRTOS MPU API wrapper function with a manually crafted stack frame.
We thank Certibit Consulting, LLC, Huazhong University of Science and
Technology and the SecLab team at Northeastern University for reporting
this issue.
+ ARMv7-M MPU ports: It is possible to configure overlapping memory
protection unit (MPU) regions such that an unprivileged task can access
privileged data.
We thank the SecLab team at Northeastern University for reporting this issue.

Changes between FreeRTOS V10.4.3 LTS Patch 1 and FreeRTOS V10.4.3 LTS Patch 2 released November 12 2021

+ ARMv7-M and ARMv8-M MPU ports – prevent non-kernel code from calling the
Expand Down
33 changes: 0 additions & 33 deletions include/mpu_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,10 @@
#endif

/* Map standard timer.h API functions to the MPU equivalents. */
#define xTimerCreate MPU_xTimerCreate
#define xTimerCreateStatic MPU_xTimerCreateStatic
#define pvTimerGetTimerID MPU_pvTimerGetTimerID
#define vTimerSetTimerID MPU_vTimerSetTimerID
#define xTimerIsTimerActive MPU_xTimerIsTimerActive
#define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle
#define xTimerPendFunctionCall MPU_xTimerPendFunctionCall
#define pcTimerGetName MPU_pcTimerGetName
#define vTimerSetReloadMode MPU_vTimerSetReloadMode
#define uxTimerGetReloadMode MPU_uxTimerGetReloadMode
Expand Down Expand Up @@ -170,36 +167,6 @@
#define PRIVILEGED_DATA __attribute__( ( section( "privileged_data" ) ) )
#define FREERTOS_SYSTEM_CALL __attribute__( ( section( "freertos_system_calls" ) ) )

/**
* @brief Calls the port specific code to raise the privilege.
*
* Sets xRunningPrivileged to pdFALSE if privilege was raised, else sets
* it to pdTRUE.
*/
#define xPortRaisePrivilege( xRunningPrivileged ) \
{ \
/* Check whether the processor is already privileged. */ \
xRunningPrivileged = portIS_PRIVILEGED(); \
\
/* If the processor is not already privileged, raise privilege. */ \
if( xRunningPrivileged == pdFALSE ) \
{ \
portRAISE_PRIVILEGE(); \
} \
}

/**
* @brief If xRunningPrivileged is not pdTRUE, calls the port specific
* code to reset the privilege, otherwise does nothing.
*/
#define vPortResetPrivilege( xRunningPrivileged ) \
{ \
if( xRunningPrivileged == pdFALSE ) \
{ \
portRESET_PRIVILEGE(); \
} \
}

#endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */

#else /* portUSING_MPU_WRAPPERS */
Expand Down
Loading