Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:51:50+00:00 2026-06-18T08:51:50+00:00

a user submitted a bug-report, where my application segfaults in __fortify_fail(). i understand that

  • 0

a user submitted a bug-report, where my application segfaults in “__fortify_fail()”.

i understand that this is related to building my application with Debian’s “hardening” flags -D_FORTIFY_SOURCE=2 -fstack-protector.

unfortunately the backtrace of the user does not tell me much yet, and the user is not super responsive (right now).

in order to understand better what is going on, i would like to know, what __fortify_fail actually does.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:51:51+00:00Added an answer on June 18, 2026 at 8:51 am

    This function is normally just an error reporter. Sample code from glibc is:

    extern char **__libc_argv attribute_hidden;
    
    void
    __attribute__ ((noreturn))
    __fortify_fail (msg)
         const char *msg;
    {
      /* The loop is added only to keep gcc happy.  */
      while (1)
        __libc_message (2, "*** %s ***: %s terminated\n",
                        msg, __libc_argv[0] ?: "<unknown>");
    }
    libc_hidden_def (__fortify_fail)
    

    It may be called here and there where sources is preferred to be fortified. “Fortification” itself is just a couple of run-time checks. Sample usage in openat function from io/openat.c is:

    int
    __openat_2 (fd, file, oflag)
         int fd;
         const char *file;
         int oflag;
    {
      if (oflag & O_CREAT)
        __fortify_fail ("invalid openat call: O_CREAT without mode");
    
      return __openat (fd, file, oflag);
    }
    

    Without fortification, O_CREAT is acceptable without mode (still this case is highly suspicious, it is legal).

    Think about __fortify_fail like about printf+abort.

    Turning telepathy on about your question, I may suggest that user have some problems with using libc in user code. /lib/x86_64-linux-gnu/libc.so.6(+0xebdf0)[0x7f75d3576df0] is a place inside libc where some runtime-check fails, so pd[0x49b5c0] is a place where libc incorrectly called from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A user has just submitted a bug report to me, saying that my app
I have this function that takes some user-submitted HTML code from the database: function
I'm building a site that has somewhat reddit-like functionality. I want user-submitted content to
I understand that parameterized queries are essential when user-submitted data is on the prowl,
Possible Duplicate: Allow user submitted HTML in PHP I'm building a small tool that
EDIT: I have submitted a bug report and Microsoft have acknowledge that it is
the other day I had a bug submitted for my app from a user
I have some user-submitted variables that I want to display in a different part
I have an each method that is run on some user-submitted data. Sometimes it
I have user submitted tags that can be any type of (valid) UTF-8 string.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.