Re: [PATCH 7/7] mkquota: Fix potental NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 10, 2021 at 12:15:28PM -0400, Theodore Ts'o wrote:
> On Fri, Aug 06, 2021 at 11:58:20AM +0200, Lukas Czerner wrote:
> > get_dq() function can fail when the memory allocation fails and so we
> > could end up dereferencing NULL pointer. Fix it.
> > 
> > Also, we should really return -ENOMEM instead of -1, or even 0 from
> > various functions in quotaio_tree.c when memory allocation fails.
> > Fix it as well.
> 
> The quota*.c files were taking from the quota_tools package, and are
> currently using the converion of setting errno and returning -1.  I
> don't think an incomplete conversion to the kernel error return
> convention is the way to go.  My long term plan for the quota
> functions in libsupport is to convert them to use the comerr_t error
> return convention, remove all of the printf functions from the
> functions, so they can be properly moved into libext2fs library as a
> first class supported library functions, and so that the high-level
> ext2fs functions would update the quota files --- so that programs
> like fuse2fs would properly update the quota records.
> 
> So I'm going to drop the error handling changes from this patch before
> applying it.

Understood, thanks!

-Lukas

> 
> Cheers,
> 
> 					- Ted
> 




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux