On Mon, 2026-06-22 at 10:39 +0530, Sana Kazi via lists.openembedded.org
wrote:
> From: Sana Kazi <[email protected]>
> 
> pthread_setname_np opens the thread's comm file using O_RDWR, but the
> function only ever writes to it.  This causes two distinct problems:
> 
> 1. Missing O_CLOEXEC: the file descriptor is not marked close-on-exec,
> so it remains open across fork+exec.  A child process that audits
> its inherited file-descriptor set will encounter an unexpected /proc
> fd it did not open and may treat this as a security violation and
> abort.
> 2. Unnecessary O_RDWR: requesting read+write access when only write
> access is needed can cause open() to fail under security policies
> that permit writing to /proc/<tid>/comm but deny reading it.
> 
> Fix both issues by replacing O_RDWR with O_WRONLY|O_CLOEXEC
> Similarly, updated pthread_getname_np to use O_CLOEXEC.
> 
> Signed-off-by: Sana Kazi <[email protected]>

Hi,

It looks like you've copied the commit message from the upstream patch.
We don't need to duplicate the information - the commit message for your
patch to OE-cre should reference the recipe that is being changed and
why this patch is needed. For example, the commit summary should look
like "glibc: ..." as you're adding a patch to the glibc recipe.

The key thing is to also explain *why* this is needed in OE-core. What
problem is solved by backporting this patch?

Please see the contribution docs [1] and previous commits for examples.

[1]: 
https://docs.yoctoproject.org/contributor-guide/submit-changes.html#implement-and-commit-changes

The original upstream commit message should remain in the .patch file.

Thanks,

-- 
Paul Barker

Attachment: signature.asc
Description: This is a digitally signed message part

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#239507): 
https://lists.openembedded.org/g/openembedded-core/message/239507
Mute This Topic: https://lists.openembedded.org/mt/119922822/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to