Symptom: In case clear_user() crosses two pages and faults on the second page the kernel may write lowcore contents to the first page, instead of clearing it.
Problem: The __clear_user() inline assembly misses earlyclobber constraint modifiers. Depending on compiler and compiler options this may lead to incorrect code which copies kernel lowcore contents to user space instead of clearing memory,
in case clear_user() faults.
Description: kernel: fix __clear_user() inline assembly constraints
Symptom: In case clear_user() crosses two pages and faults on the
second page the kernel may write lowcore contents to the
first page, instead of clearing it.
Problem: The __clear_user() inline assembly misses earlyclobber
constraint modifiers. Depending on compiler and compiler
options this may lead to incorrect code which copies kernel
lowcore contents to user space instead of clearing memory,
in case clear_user() faults.
Solution: Add missing earlyclobber constraint modifiers.
Preventive: yes
Upstream-ID: 89aba4c26fae4e4 59f755a18912845 c348ee48f3
Affected Releases:
18.04
20.04
22.04
22.10
23.04