Re: get_write_access hook

From: Stephen Smalley (sdsat_private)
Date: Tue Oct 02 2001 - 11:33:54 PDT

  • Next message: David Wagner: "Re: get_write_access hook"

    On Tue, 2 Oct 2001, Seth Arnold wrote:
    
    > The kernel will not help us with our race condition (writing to a file
    > being executing, executing a file opened for writing, that whole ball of
    > wax) until the i_writecount parameter is non-zero. The only safe place
    > to change the i_writecount from zero to anything else is in
    > get_write_access. Because I need the kernel's protection of executing
    > files, I don't think I could put the hook anywhere else.
    
    I guess I still don't understand how you intend to use the hook.  You've
    mentioned a race condition between verifying the certificate on a program
    and having the program modified.  If you are verifying the certificate
    upon program execution (e.g. in the bprm_security_ops set_security hook),
    then deny_write_access has already been called, so no writes are
    permitted.  If you are verifying the certificate at some other point, then
    your module can always call deny_write_access and allow_write_access to
    ensure that no writes occur during some critical region.  So what is the
    point of this hook?
    
    --
    Stephen D. Smalley, NAI Labs
    ssmalleyat_private
    
    
    
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Tue Oct 02 2001 - 11:35:26 PDT