Bug 509634 - sys_quotactl and sys_quotactl_fd need extra ARG4 check
Summary: sys_quotactl and sys_quotactl_fd need extra ARG4 check
Status: ASSIGNED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.25 GIT
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: mcermak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-18 11:03 UTC by mcermak
Modified: 2025-11-24 11:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
proposed patch (24.83 KB, patch)
2025-09-30 14:33 UTC, mcermak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mcermak 2025-09-18 11:03:50 UTC
The sys_quotactl_fd and sys_quotactl syscalls need extra check for the ARG4 validity as mentioned in

https://bugs.kde.org/show_bug.cgi?id=509567#c1
Comment 1 mcermak 2025-09-30 14:33:07 UTC
Created attachment 185399 [details]
proposed patch
Comment 2 Mark Wielaard 2025-11-24 11:48:45 UTC
NEWS entry OK.
All linux handlers for quotactl and quotactl_fd added a POST handler.
- Question, why isn't quotactl wrapped on ppc32?
  Probably just an oversight, ppc64 was wrapped in commit 7f74ba249
Typo funtion_name -> function_name argument corrected in common_[pre|post]_io_getevents. OK
Added common_[pre|post]_quotactl_p4_check called from PRE/POST quotactl[_fd] wrappers. OK
- common_pre_quotactl_p4_check should not SET_STATUS_Failure( VKI_EINVAL ) on unknown subop, maybe the kernel does know, if not the kernel will set it (maybe warn? if not quiet?)
vki-linux.h added macros to get subcommand, subcommand ids and structs used. OK.

Looks good, but would like to see ppc32 wrapped and SET_STATUS_Failure removed from common_pre_quotactl_p4_check.