On 07/24, Djalal Harouni wrote:
>
> static int mem_open(struct inode *inode, struct file *file)
> {
> - return __mem_open(inode, file, PTRACE_MODE_ATTACH);
> + int ret = __mem_open(inode, file, PTRACE_MODE_ATTACH);
> +
> + /* OK to pass negative loff_t, we can catch out-of-range */
>
__mem_open() which is called by both /proc//environ and
/proc//mem ->open() handlers will allow the use of negative offsets.
/proc//mem has negative offsets but not /proc//environ.
Clean this by moving the 'force FMODE_UNSIGNED_OFFSET flag' to mem_open()
to allow negative offsets only on
2 matches
Mail list logo