---
id: CVE-2021-47087
title: |-
  In the Linux kernel, the following vulnerability has been resolved:

  tee: optee: Fix incorrect page free bug

  Pointer to the allocated pages (struct page *page) has already
  progressed towards the end of allocation
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  tee: optee: Fix incorrect page free bug

  Pointer to the allocated pages (struct page *page) has already
  progressed towards the end of allocation. It is incorrect to per…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-763
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 5.4.140, < 5.4.169'
  - 'linux_kernel >= 5.10.58, < 5.10.89'
  - 'linux_kernel >= 5.14, < 5.15.12'
  - linux_kernel = 5.16
patched:
  - linux_kernel 5.15.12
published: '2024-03-04'
updated: '2026-08-04'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-47087'
references:
  - url: 'https://git.kernel.org/stable/c/18549bf4b21c739a9def39f27dcac53e27286ab5'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/806142c805cacd098e61bdc0f72c778a2389fe4a'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/91e94e42f6fc49635f1a16d8ae3f79552bcfda29'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/ad338d825e3f7b96ee542bf313728af2d19fe9ad'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/18549bf4b21c739a9def39f27dcac53e27286ab5'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/806142c805cacd098e61bdc0f72c778a2389fe4a'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/91e94e42f6fc49635f1a16d8ae3f79552bcfda29'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/ad338d825e3f7b96ee542bf313728af2d19fe9ad'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00236
epssPercentile: 0.12968
ingestedAt: '2026-08-05T05:58:02.438Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

tee: optee: Fix incorrect page free bug

Pointer to the allocated pages (struct page *page) has already
progressed towards the end of allocation. It is incorrect to perform
__free_pages(page, order) using this pointer as we would free any
arbitrary pages. Fix this by stop modifying the page pointer.

## Affected

- `linux_kernel >= 5.4.140, < 5.4.169`
- `linux_kernel >= 5.10.58, < 5.10.89`
- `linux_kernel >= 5.14, < 5.15.12`
- `linux_kernel = 5.16`

## Remediation

Upgrade past the affected range:

- `linux_kernel 5.15.12`
