Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-1518

Missing/bad operations in mdd_{obf,dot_lustre}_obj_op causing LBUGs

Details

    • 3
    • 4470

    Description

      An unprivileged user can cause an MDS LBUG by issuing "chmod +x /mnt/lustre/.lustre/fid". Similarly root can cause an LBUG by issuing

      {get,set}

      facl calls against this directory. Privileged users cannot changes the attributes of /mnt/lustre/.lustre.

      Attachments

        Issue Links

          Activity

            [LU-1518] Missing/bad operations in mdd_{obf,dot_lustre}_obj_op causing LBUGs
            pjones Peter Jones added a comment -

            Landed for 2.3 and 2.4. If any more edge cases are found let's track them under a new ticket

            pjones Peter Jones added a comment - Landed for 2.3 and 2.4. If any more edge cases are found let's track them under a new ticket
            pjones Peter Jones added a comment -

            Niu is working on this now

            pjones Peter Jones added a comment - Niu is working on this now

            John, Thanks for pointing me at your sys_ tests. I had no problem cloning your git & building the tiny tests. That should make it a bit easier to exactly reproduce your results.

            bogl Bob Glossman (Inactive) added a comment - John, Thanks for pointing me at your sys_ tests. I had no problem cloning your git & building the tiny tests. That should make it a bit easier to exactly reproduce your results.
            jhammond John Hammond added a comment -

            Thanks Bob.

            I pushed the commands I used in bug-notes to https://github.com/jhammond/sys. There all pretty simple and you can probably get by without them. But they are useful in that they do what it says on the can, whereas mv, ln, or ls do a lot of stating end up doing different things depending on the types of their operands, whether you added a trailing slash, and so on.

            jhammond John Hammond added a comment - Thanks Bob. I pushed the commands I used in bug-notes to https://github.com/jhammond/sys . There all pretty simple and you can probably get by without them. But they are useful in that they do what it says on the can, whereas mv, ln, or ls do a lot of stating end up doing different things depending on the types of their operands, whether you added a trailing slash, and so on.

            additional revisions fixed LBUGs seen in sys_rename XXX .lustre/fid and sys_rename .lustre/fid XXX. still working on other issues in bug-notes attachment.

            bogl Bob Glossman (Inactive) added a comment - additional revisions fixed LBUGs seen in sys_rename XXX .lustre/fid and sys_rename .lustre/fid XXX. still working on other issues in bug-notes attachment.
            jhammond John Hammond added a comment -

            sys_rename is an imaginary command that only calls rename(argv[1], argv[2]).

            [root]# cd /mnt/lustre/
            [root]# mkdir XXX
            [root]# man mv
            [root]# mv --no-target-directory XXX .lustre/fid
            
            jhammond John Hammond added a comment - sys_rename is an imaginary command that only calls rename(argv [1] , argv [2] ). [root]# cd /mnt/lustre/ [root]# mkdir XXX [root]# man mv [root]# mv --no-target-directory XXX .lustre/fid

            sys_mkdir? sys_rename? what are these?

            I can't reproduce this with ordinary cmds:

            [root@centos26 ~]# cd /mnt/lustre
            [root@centos26 lustre]# mkdir XXX
            [root@centos26 lustre]# rename XXX .lustre/fid
            [root@centos26 lustre]#

            No LBUG, no pointer dereference seen.

            bogl Bob Glossman (Inactive) added a comment - sys_mkdir? sys_rename? what are these? I can't reproduce this with ordinary cmds: [root@centos26 ~] # cd /mnt/lustre [root@centos26 lustre] # mkdir XXX [root@centos26 lustre] # rename XXX .lustre/fid [root@centos26 lustre] # No LBUG, no pointer dereference seen.
            jhammond John Hammond added a comment -

            Results of some poking after Bob's lu1518.setattr.patch from Aug 21 2012.

            jhammond John Hammond added a comment - Results of some poking after Bob's lu1518.setattr.patch from Aug 21 2012.
            jhammond John Hammond added a comment -

            With your latest patch I found one more LBUG related to the handling of .lustre/fid. If root does

            cd /mnt/lustre
            sys_mkdir XXX
            sys_rename XXX .lustre/fid
            

            Then you get to the same null pointer dereference osd_xattr_get(). But I didn't have much time to poke at it, so I bet there are probably more there.

            jhammond John Hammond added a comment - With your latest patch I found one more LBUG related to the handling of .lustre/fid. If root does cd /mnt/lustre sys_mkdir XXX sys_rename XXX .lustre/fid Then you get to the same null pointer dereference osd_xattr_get(). But I didn't have much time to poke at it, so I bet there are probably more there.
            jhammond John Hammond added a comment -

            Please add LU-1777 as a sub-issue, as I guess I don't have sufficient Jira clout to do so.

            jhammond John Hammond added a comment - Please add LU-1777 as a sub-issue, as I guess I don't have sufficient Jira clout to do so.
            bogl Bob Glossman (Inactive) added a comment - - edited

            patch with incremental special case test in mdt_reint_setattr()

            bogl Bob Glossman (Inactive) added a comment - - edited patch with incremental special case test in mdt_reint_setattr()

            People

              niu Niu Yawei (Inactive)
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: