USB device authorization: Difference between interface_authorized_default and authorized_default

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












What is the difference between /sys/bus/usb/devices/usbX/authorized_default and /sys/bus/usb/devices/usbX/interface_authorized_default? Basically, both of the files are responsible for denying access to newly connected devices to USB ports as described here. They seem to work in the same way, so what's the difference? Which one should I use?










share|improve this question

























    up vote
    2
    down vote

    favorite












    What is the difference between /sys/bus/usb/devices/usbX/authorized_default and /sys/bus/usb/devices/usbX/interface_authorized_default? Basically, both of the files are responsible for denying access to newly connected devices to USB ports as described here. They seem to work in the same way, so what's the difference? Which one should I use?










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      What is the difference between /sys/bus/usb/devices/usbX/authorized_default and /sys/bus/usb/devices/usbX/interface_authorized_default? Basically, both of the files are responsible for denying access to newly connected devices to USB ports as described here. They seem to work in the same way, so what's the difference? Which one should I use?










      share|improve this question













      What is the difference between /sys/bus/usb/devices/usbX/authorized_default and /sys/bus/usb/devices/usbX/interface_authorized_default? Basically, both of the files are responsible for denying access to newly connected devices to USB ports as described here. They seem to work in the same way, so what's the difference? Which one should I use?







      linux-kernel usb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 21 at 14:23









      Mikhail Morfikov

      4,335114267




      4,335114267




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          The difference is that the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. It's mentioned in the document you linked to:



          Interface authorization

          ..........................

          There is a similar approach to allow or deny specific USB interfaces.

          That allows to block only a subset of an USB device.

          ..........................

          Deny interfaces per default:



          echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default


          Authorize an interface:



          echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


          This is useful when e.g. you need to debug devices & drivers (no matching driver found or wrong driver/configuration used and so on...), per feature/functionality lockdown of USB devices etc

          In a nutshell:




          • use authorized_default to deny or limit the number of allowed devices

            e.g. deauthorize new devices connected to hostX by default



            echo 0 > /sys/bus/usb/devices/usbX/authorized_default


            then connect and authorize the device of your choice:



            echo 1 > /sys/bus/usb/devices/DEVICE/authorized



          • use interface_authorized_default if you need to debug or allow/use only a subset of functionality e.g. deny interfaces on hostX by default:



            echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default:


            authorize the interface of your choice:



            echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


            and trigger driver probing:



            echo INTERFACE > /sys/bus/usb/drivers_probe






          share|improve this answer




















          • So, an INTERFACE is just a single USB port or a single USB device?
            – Mikhail Morfikov
            Aug 21 at 16:58











          • @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
            – don_crissti
            Aug 21 at 17:15











          • I'm in the middle of the vid from that article. :)
            – Mikhail Morfikov
            Aug 21 at 17:25










          • Ok, now I know everything, thanks. :)
            – Mikhail Morfikov
            Aug 21 at 19:37










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463881%2fusb-device-authorization-difference-between-interface-authorized-default-and-au%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          The difference is that the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. It's mentioned in the document you linked to:



          Interface authorization

          ..........................

          There is a similar approach to allow or deny specific USB interfaces.

          That allows to block only a subset of an USB device.

          ..........................

          Deny interfaces per default:



          echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default


          Authorize an interface:



          echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


          This is useful when e.g. you need to debug devices & drivers (no matching driver found or wrong driver/configuration used and so on...), per feature/functionality lockdown of USB devices etc

          In a nutshell:




          • use authorized_default to deny or limit the number of allowed devices

            e.g. deauthorize new devices connected to hostX by default



            echo 0 > /sys/bus/usb/devices/usbX/authorized_default


            then connect and authorize the device of your choice:



            echo 1 > /sys/bus/usb/devices/DEVICE/authorized



          • use interface_authorized_default if you need to debug or allow/use only a subset of functionality e.g. deny interfaces on hostX by default:



            echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default:


            authorize the interface of your choice:



            echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


            and trigger driver probing:



            echo INTERFACE > /sys/bus/usb/drivers_probe






          share|improve this answer




















          • So, an INTERFACE is just a single USB port or a single USB device?
            – Mikhail Morfikov
            Aug 21 at 16:58











          • @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
            – don_crissti
            Aug 21 at 17:15











          • I'm in the middle of the vid from that article. :)
            – Mikhail Morfikov
            Aug 21 at 17:25










          • Ok, now I know everything, thanks. :)
            – Mikhail Morfikov
            Aug 21 at 19:37














          up vote
          1
          down vote



          accepted










          The difference is that the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. It's mentioned in the document you linked to:



          Interface authorization

          ..........................

          There is a similar approach to allow or deny specific USB interfaces.

          That allows to block only a subset of an USB device.

          ..........................

          Deny interfaces per default:



          echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default


          Authorize an interface:



          echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


          This is useful when e.g. you need to debug devices & drivers (no matching driver found or wrong driver/configuration used and so on...), per feature/functionality lockdown of USB devices etc

          In a nutshell:




          • use authorized_default to deny or limit the number of allowed devices

            e.g. deauthorize new devices connected to hostX by default



            echo 0 > /sys/bus/usb/devices/usbX/authorized_default


            then connect and authorize the device of your choice:



            echo 1 > /sys/bus/usb/devices/DEVICE/authorized



          • use interface_authorized_default if you need to debug or allow/use only a subset of functionality e.g. deny interfaces on hostX by default:



            echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default:


            authorize the interface of your choice:



            echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


            and trigger driver probing:



            echo INTERFACE > /sys/bus/usb/drivers_probe






          share|improve this answer




















          • So, an INTERFACE is just a single USB port or a single USB device?
            – Mikhail Morfikov
            Aug 21 at 16:58











          • @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
            – don_crissti
            Aug 21 at 17:15











          • I'm in the middle of the vid from that article. :)
            – Mikhail Morfikov
            Aug 21 at 17:25










          • Ok, now I know everything, thanks. :)
            – Mikhail Morfikov
            Aug 21 at 19:37












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          The difference is that the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. It's mentioned in the document you linked to:



          Interface authorization

          ..........................

          There is a similar approach to allow or deny specific USB interfaces.

          That allows to block only a subset of an USB device.

          ..........................

          Deny interfaces per default:



          echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default


          Authorize an interface:



          echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


          This is useful when e.g. you need to debug devices & drivers (no matching driver found or wrong driver/configuration used and so on...), per feature/functionality lockdown of USB devices etc

          In a nutshell:




          • use authorized_default to deny or limit the number of allowed devices

            e.g. deauthorize new devices connected to hostX by default



            echo 0 > /sys/bus/usb/devices/usbX/authorized_default


            then connect and authorize the device of your choice:



            echo 1 > /sys/bus/usb/devices/DEVICE/authorized



          • use interface_authorized_default if you need to debug or allow/use only a subset of functionality e.g. deny interfaces on hostX by default:



            echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default:


            authorize the interface of your choice:



            echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


            and trigger driver probing:



            echo INTERFACE > /sys/bus/usb/drivers_probe






          share|improve this answer












          The difference is that the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. It's mentioned in the document you linked to:



          Interface authorization

          ..........................

          There is a similar approach to allow or deny specific USB interfaces.

          That allows to block only a subset of an USB device.

          ..........................

          Deny interfaces per default:



          echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default


          Authorize an interface:



          echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


          This is useful when e.g. you need to debug devices & drivers (no matching driver found or wrong driver/configuration used and so on...), per feature/functionality lockdown of USB devices etc

          In a nutshell:




          • use authorized_default to deny or limit the number of allowed devices

            e.g. deauthorize new devices connected to hostX by default



            echo 0 > /sys/bus/usb/devices/usbX/authorized_default


            then connect and authorize the device of your choice:



            echo 1 > /sys/bus/usb/devices/DEVICE/authorized



          • use interface_authorized_default if you need to debug or allow/use only a subset of functionality e.g. deny interfaces on hostX by default:



            echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default:


            authorize the interface of your choice:



            echo 1 > /sys/bus/usb/devices/INTERFACE/authorized


            and trigger driver probing:



            echo INTERFACE > /sys/bus/usb/drivers_probe







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 21 at 16:37









          don_crissti

          47.3k15125155




          47.3k15125155











          • So, an INTERFACE is just a single USB port or a single USB device?
            – Mikhail Morfikov
            Aug 21 at 16:58











          • @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
            – don_crissti
            Aug 21 at 17:15











          • I'm in the middle of the vid from that article. :)
            – Mikhail Morfikov
            Aug 21 at 17:25










          • Ok, now I know everything, thanks. :)
            – Mikhail Morfikov
            Aug 21 at 19:37
















          • So, an INTERFACE is just a single USB port or a single USB device?
            – Mikhail Morfikov
            Aug 21 at 16:58











          • @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
            – don_crissti
            Aug 21 at 17:15











          • I'm in the middle of the vid from that article. :)
            – Mikhail Morfikov
            Aug 21 at 17:25










          • Ok, now I know everything, thanks. :)
            – Mikhail Morfikov
            Aug 21 at 19:37















          So, an INTERFACE is just a single USB port or a single USB device?
          – Mikhail Morfikov
          Aug 21 at 16:58





          So, an INTERFACE is just a single USB port or a single USB device?
          – Mikhail Morfikov
          Aug 21 at 16:58













          @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
          – don_crissti
          Aug 21 at 17:15





          @MikhailMorfikov - no... the article linked in my post gives a basic explanation of what happens when a USB device is plugged in. This answer from SO explains what an interface is... For more details, this is a good place to start: USB in a NutShell
          – don_crissti
          Aug 21 at 17:15













          I'm in the middle of the vid from that article. :)
          – Mikhail Morfikov
          Aug 21 at 17:25




          I'm in the middle of the vid from that article. :)
          – Mikhail Morfikov
          Aug 21 at 17:25












          Ok, now I know everything, thanks. :)
          – Mikhail Morfikov
          Aug 21 at 19:37




          Ok, now I know everything, thanks. :)
          – Mikhail Morfikov
          Aug 21 at 19:37

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463881%2fusb-device-authorization-difference-between-interface-authorized-default-and-au%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay