Open
回合主线补丁:procfs: fix missing RCU protection when reading real_parent in do_task_stat() #8688
JacksparkAdd on  Mar 9
Jackspark
Jackspark
Mar 9 Create

回合主线补丁:procfs: fix missing RCU protection when reading real_parent in do_task_stat()
补丁链接:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76149d53502cf17ef3ae454ff384551236fba867
补丁描述:
修复do_task_stat()中读取real_parent时缺失的RCU保护
在读取 /proc/[pid]/stat 时,do_task_stat()会访问task->real_parent,但缺乏适当的RCU保护,进入该函数前task->real_parent可能已被销毁,可能会导致UAF问题
本补丁使用task_ppid_nr_ns()代替task_tgid_nr_ns(),从而在访问task->real_parent时加入正确的RCU保护,确保在读取父进程指针前就已经处于RCU保护下

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Mar 9 Added label: sig/Kernel
openeuler-ci-bot
openeuler-ci-botCollaborators
Mar 9 Comments:

Welcome To openEuler Community

Hey @Jackspark , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: Kernel ,
and any of the maintainers: @hanjunguo, @oekernel, @sanglipeng, @zeng_zhaorong, @zhengzengkai ,
and any of the committers: @CTC-XiboWang, @Frank_Sae, @GongLei-, @LiuYongQiang0816, @SuperSix173, @Tankll2021, @TrueAI, @allen-shi, @baratta, @caixu-blue, @chenjiesong, @chenjunxin1992, @chenke2026, @chiqijun, @chriszjh, @duanqiangwen, @fangfeng123, @fanghaiqinghw, @gaojuxin09, @gouhao2022, @guzitao, @hanjunguo, @hanliyang, @hellotcc, @hjx_gitff, @hongwu-wang, @htforge, @hu-chunzhi, @hunan4222, @jackknight, @jerry_lilijun, @junlong-zheng, @juntianlinux, @kailiu42, @kaitiandu, @kazero00, @kevinzhu1, @kile2009, @koishimind, @kongzizaixian, @leoliu-oc, @li-huisong, @linan888, @linyunsheng, @liulongfang, @lostway1, @lujialin2, @markyuan4ta21, @mingqian218472, @mufengyan, @qinirao, @robinorg, @rock_hw, @sanglipeng, @shu-shengming, @shuaijiakun, @sming56_admin, @stavewu, @stkid, @wangboe2022, @wenzhiwei11, @whoisxxx, @wkfxxx, @woqidaideshi, @wsoydl, @xingmz1, @xukuohai, @yeweihua999, @ygn-ndwd-official, @yonghu_4dc5, @young-sun, @yuehaibing_planb, @yuzenghui1, @zhang-changzhong, @zhangyi089, @zhujianwei001, @zichengqu, @zqiao216 .

likedislike
openeuler-infra-botopeneuler-infra-botCollaborators
Mar 9 Associated pull request
openeuler-infra-botopeneuler-infra-botCollaborators
Mar 9 Associated pull request
openeuler-infra-botopeneuler-infra-botCollaborators
Mar 9 Associated pull request