bugacl - Bugs: bug #59061, acl_from_mode doesn't properly...

 
 

bug #59061: acl_from_mode doesn't properly handle allocation failure

Submitted by:  Tavian Barnes <tavianator>
Submitted on:  Thu 03 Sep 2020 08:50:23 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 03 Sep 2020 09:11:47 PM UTC, comment #2: 

Indeed, thanks for the fix.

The same bug exists in acl_copy_int, so I've fixed that at the same time.

Andreas Gruenbacher <agruen>
Project Administrator
Thu 03 Sep 2020 08:58:31 PM UTC, comment #1: 

Patch attached.

(file #49740)

Tavian Barnes <tavianator>
Thu 03 Sep 2020 08:50:23 PM UTC, original submission:  

acl_from_mode() does

        acl_obj_p = __acl_init_obj(3);
        if (!acl_obj_p)
                goto fail;
        ...
fail:
        __acl_free_acl_obj(acl_obj_p);
        return NULL;

But __acl_free_acl_obj() doesn't handle NULL, resulting in a segfault.  Changing that `goto fail;` into `return NULL;` fixes the crash.

Tavian Barnes <tavianator>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by agruen (Posted a comment)
  • -email is unavailable- added by tavianator (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-03 agruen StatusNone => Fixed
        Open/ClosedOpen => Closed
    2020-09-03 tavianator Attached File- => Added 0001-acl_from_mode-Fix-segfault-on-allocation-failure.patch, #49740

    Back to the top


    Powered by Savane 3.5