Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15473

Isolate/sandbox PAM modules, so that they can't crash the server

Details

    • 10.4.0-1

    Description

      Buggy PAM modules can currently crash the server. See MDEV-10361 for example. Should auth_pam isolate PAM modules somehow to prevent problems like this from taking down the whole server? Is it feasible for auth_pam to use sandboxes for PAM modules, or would that cripple performance and slow down authentication too much?

      Attachments

        Issue Links

          Activity

            GeoffMontee Geoff Montee (Inactive) created issue -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Field Original Value New Value
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            julien.fritsch Julien Fritsch made changes -
            Assignee Sergei Golubchik [ serg ]
            ralf.gebhardt Ralf Gebhardt added a comment - - edited

            serg If I understand this correctly, the server is crashing. From my point of view this should be a bug, do you agree?

            ralf.gebhardt Ralf Gebhardt added a comment - - edited serg If I understand this correctly, the server is crashing. From my point of view this should be a bug, do you agree?

            No, this is not a bug. Everything works as designed. By design, a plugin is executed in the server address space, in the server process. So if the plugin crashes, it is expected that it will take the whole server with it.

            It is possible, of course, to redesign the plugin architecture and execute plugins in a sandbox. But this will be by no means a bug fix.

            serg Sergei Golubchik added a comment - No, this is not a bug. Everything works as designed. By design, a plugin is executed in the server address space, in the server process. So if the plugin crashes, it is expected that it will take the whole server with it. It is possible, of course, to redesign the plugin architecture and execute plugins in a sandbox. But this will be by no means a bug fix.
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4 [ 22408 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            ralf.gebhardt Ralf Gebhardt added a comment -

            By getting MDEV-7032 done, the Server should not crash in this cases anymore

            ralf.gebhardt Ralf Gebhardt added a comment - By getting MDEV-7032 done, the Server should not crash in this cases anymore
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            ratzpo Rasmus Johansson (Inactive) made changes -
            Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
            holyfoot Alexey Botchkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Sprint 10.4.0-1 [ 254 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Rank Ranked lower
            holyfoot Alexey Botchkov added a comment - - edited

            http://lists.askmonty.org/pipermail/commits/2018-June/012595.html

            Short description -
            structurally i added the auth_pam_safe.so and auth_pam_tool modules.
            The 'so' provides the same interface as the auth_pam.so, just is crash-safe. The auth_pam_tool is the 'sandbox' applicatin that does the PAM calls.
            Part of the auth_pam.c was moved to the auth_pam_base.c to be included into auth_pam.c and auth_pam_toll.c.

            I didn't add tests here intentionally - would like to agree the overall design first.

            holyfoot Alexey Botchkov added a comment - - edited http://lists.askmonty.org/pipermail/commits/2018-June/012595.html Short description - structurally i added the auth_pam_safe.so and auth_pam_tool modules. The 'so' provides the same interface as the auth_pam.so, just is crash-safe. The auth_pam_tool is the 'sandbox' applicatin that does the PAM calls. Part of the auth_pam.c was moved to the auth_pam_base.c to be included into auth_pam.c and auth_pam_toll.c. I didn't add tests here intentionally - would like to agree the overall design first.
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            holyfoot Alexey Botchkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            holyfoot Alexey Botchkov added a comment - http://lists.askmonty.org/pipermail/commits/2018-July/012669.html
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            holyfoot Alexey Botchkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            holyfoot Alexey Botchkov added a comment - Final patch. http://lists.askmonty.org/pipermail/commits/2018-July/012672.html
            holyfoot Alexey Botchkov made changes -
            Fix Version/s 10.4.0 [ 23115 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]

            still need to check that filesystem permissions on the new directory is set correctly

            and minor cleanup in tests.

            serg Sergei Golubchik added a comment - still need to check that filesystem permissions on the new directory is set correctly and minor cleanup in tests.
            serg Sergei Golubchik made changes -
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            julien.fritsch Julien Fritsch made changes -
            julien.fritsch Julien Fritsch made changes -
            julien.fritsch Julien Fritsch made changes -
            Epic Link PT-73 [ 68549 ]
            holyfoot Alexey Botchkov added a comment - http://lists.askmonty.org/pipermail/commits/2018-July/012680.html
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            holyfoot Alexey Botchkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            holyfoot Alexey Botchkov added a comment - http://lists.askmonty.org/pipermail/commits/2018-July/012691.html
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            holyfoot Alexey Botchkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            holyfoot Alexey Botchkov added a comment - http://lists.askmonty.org/pipermail/commits/2018-July/012692.html
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            holyfoot Alexey Botchkov added a comment - http://lists.askmonty.org/pipermail/commits/2018-July/012698.html
            holyfoot Alexey Botchkov made changes -
            issue.field.resolutiondate 2018-07-14 19:44:03.0 2018-07-14 19:44:03.835
            holyfoot Alexey Botchkov made changes -
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            greenman Ian Gilfillan made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Rank Ranked higher
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            hholzgra Hartmut Holzgraefe made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 85839 ] MariaDB v4 [ 133484 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 128753 118208

            People

              holyfoot Alexey Botchkov
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.