-
Notifications
You must be signed in to change notification settings - Fork 582
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
interfaces/default: allow owner read on @{PROC}/@{pid}/sessionid
#14673
base: master
Are you sure you want to change the base?
interfaces/default: allow owner read on @{PROC}/@{pid}/sessionid
#14673
Conversation
This is used by auditd, and is generally safe to expose. Signed-off-by: Zeyad Gouda <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14673 +/- ##
==========================================
+ Coverage 78.95% 78.97% +0.02%
==========================================
Files 1084 1085 +1
Lines 146638 147119 +481
==========================================
+ Hits 115773 116183 +410
- Misses 23667 23713 +46
- Partials 7198 7223 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
The sessionid is somewhat unexpectedly the audit session ID and not anything else:
static ssize_t proc_sessionid_read(struct file * file, char __user * buf,
size_t count, loff_t *ppos)
{
struct inode * inode = file_inode(file);
struct task_struct *task = get_proc_task(inode);
ssize_t length;
char tmpbuf[TMPBUFLEN];
if (!task)
return -ESRCH;
length = scnprintf(tmpbuf, TMPBUFLEN, "%u",
audit_get_sessionid(task));
put_task_struct(task);
return simple_read_from_buffer(buf, count, ppos, tmpbuf, length);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - this is world-readable by default in the kernel and doesn't contain any sensitive information.
This is used by auditd, and is generally safe to expose.