SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Student Security Act of 2017''.

SEC. 2. STUDENT SECURITY LOAN FORGIVENESS PROGRAM.

    Section 455 of the Higher Education Act of 1965 (20 U.S.C. 1087e) 
is amended by adding at the end the following:
    ``(r) Student Security Loan Forgiveness Program.--
            ``(1) Program authorized.--Beginning not later than 180 
        days after the date of the enactment of the Student Security 
        Act of 2017, the Secretary of Education, jointly with the 
        Commissioner of Social Security, shall carry out a program 
        under which the Secretary shall issue student loan forgiveness 
        credits to qualified borrowers of eligible Federal Direct loans 
        in exchange for delayed eligibility for old-age insurance 
        benefits under title II of the Social Security Act (as amended 
        by the Student Security Act of 2017) in accordance with this 
        subsection.
            ``(2) Agreement required.--To be eligible to participate in 
        the program, a qualified borrower shall enter into a written 
        agreement with the Secretary of Education and the Commissioner 
        of Social Security under which the borrower--
                    ``(A) elects to receive a specified number of 
                student loan forgiveness credits not greater than 73; 
                and
                    ``(B) acknowledges the extent of the borrower's 
                delayed eligibility for old-age insurance benefits 
                under title II of the Social Security Act (as amended 
                by the Student Security Act of 2017) as a result of 
                receiving such credits.
            ``(3) Termination.--No borrower may enter into an agreement 
        under paragraph (2) unless such borrower was a qualified 
        borrower on or before the date that is 15 years after the date 
        of the enactment of the Student Security Act of 2017.
            ``(4) Combination with other forgiveness programs.--Unless 
        otherwise provided by law, a qualified borrower may combine 
        forgiveness under this subsection with other forgiveness 
        programs under this Act, except in no case shall the total 
        amount of forgiveness received by a borrower under all such 
        programs exceed the amount of Federal student loans owed by 
        such borrower.
            ``(5) Definitions.--In this section:
                    ``(A) Default.--The term `default' has the meaning 
                given the term in section 435(l).
                    ``(B) Eligible federal direct loan.--The term 
                `eligible Federal Direct loan' means any loan made 
                under this part, including any such loan on which the 
                borrower has defaulted.
                    ``(C) Initial qualifying date.--The term `initial 
                qualifying date' means the date that is 24 months after 
                the date of the enactment of the Student Security Act 
                of 2017.
                    ``(D) Qualified borrower.--The term `qualified 
                borrower'--
                            ``(i) with respect to a borrower who seeks 
                        to enter into an agreement under paragraph (2) 
                        on or before the initial qualifying date, means 
                        a borrower of an eligible Federal Direct loan 
                        who is not entitled to collect old-age 
                        insurance benefits under title II of the Social 
                        Security Act as of the date of the agreement 
                        under paragraph (2), including a borrower who 
                        is a defaulted borrower; and
                            ``(ii) with respect to a borrower who seeks 
                        to enter into an agreement under paragraph (2) 
                        after the initial qualifying date, means--
                                    ``(I) a borrower of an eligible 
                                Federal Direct loan who is not entitled 
                                to collect old-age insurance benefits 
                                under title II of the Social Security 
                                Act as of the date of the agreement 
                                under paragraph (2), including a 
                                borrower who is a defaulted borrower; 
                                and
                                    ``(II) who was eligible for a 
                                deferment under subsection (f)(2)(A) at 
                                any time during the five-year period 
                                preceding the date of the agreement 
                                under paragraph (2).
                    ``(E) Student loan forgiveness credit.--The term 
                `student loan forgiveness credit' means the 
                cancellation of the obligation of a qualified borrower 
                to repay $550 in eligible Federal Direct loans in 
                exchange for delayed eligibility for old-age insurance 
                benefits as specified in title II of the Social 
                Security Act (as amended by the Student Security Act of 
                2017).''.

SEC. 3. DELAYED ELIGIBILITY FOR OLD-AGE INSURANCE BENEFITS.

    (a) Retirement Age; Early Retirement Age.--Section 216(l) of the 
Social Security Act (42 U.S.C. 416(l)) is amended by adding at the end 
the following:
    ``(4) Notwithstanding the preceding paragraphs of this subsection, 
in the case of an individual who receives one or more student loan 
forgiveness credits under section 455(r) of the Higher Education Act of 
1965--
            ``(A) the retirement age with respect to such individual 
        shall be deemed to be--
                    ``(i) the retirement age determined with respect to 
                such individual under paragraph (1); plus
                    ``(ii) a number of additional months equal to the 
                number of student loan forgiveness credits received by 
                the individual under such section 455(r); and
            ``(B) the early retirement age with respect to such 
        individual shall be deemed to be--
                    ``(i) the early retirement age determined with 
                respect to such individual under paragraph (2); plus
                    ``(ii) a number of additional months equal to the 
                number of student loan forgiveness credits received by 
                the individual under such section 455(r).''.
    (b) Delayed Retirement Credits.--Section 202(w) of the Social 
Security Act (42 U.S.C. 402(w)) is amended by inserting after ``age 
70'' each place it appears the following: ``(or, in the case of an 
individual described in paragraph (4) of section 216(l), age 70 plus 
the number of additional months determined under subparagraph (A)(ii) 
of such paragraph)''.
    (c) Voluntary Suspension of Benefits.--Section 202(z) of the Social 
Security Act (42 U.S.C. 402(z)) is amended by inserting after ``the age 
of 70'' the following: ``(or, in the case of an individual described in 
paragraph (4) of section 216(l), the age of 70 plus the number of 
additional months determined under subparagraph (A)(ii) of such 
paragraph)''.

SEC. 4. INTERFUND BORROWING.

    Section 201(l) of the Social Security Act (42 U.S.C. 401(l)) is 
amended to read as follows:
    ``(l)(1) If at any time the Managing Trustee determines that 
borrowing authorized under this subsection is necessary to pay full 
benefit payments from the Federal Disability Insurance Trust Fund, the 
Managing Trustee may borrow such necessary amounts from the Federal 
Old-Age and Survivors Insurance Trust Fund for transfer to and deposit 
in the Federal Disability Insurance Trust Fund.
    ``(2) In any case where a loan has been made to the Federal 
Disability Insurance Trust Fund under paragraph (1), there shall be 
transferred on the last day of each month after such loan is made, from 
the borrowing Trust Fund to the lending Trust Fund, the total interest 
accrued to such day with respect to the unrepaid balance of such loan 
at a rate equal to the rate which the lending Trust Fund would earn on 
the amount involved if the loan were an investment under subsection (d) 
(even if such an investment would earn interest at a rate different 
than the rate earned by investments redeemed by the lending Trust Fund 
in order to make the loan).
    ``(3)(A) If in any month after a loan has been made to the Federal 
Disability Insurance Trust Fund under paragraph (1), the Managing 
Trustee determines that the assets of such Trust Fund are sufficient to 
permit repayment of all or part of any loans made to such Fund under 
paragraph (1), he shall make such repayments as he determines to be 
appropriate.
            ``(B) The full amount of all loans made under paragraph (1) 
        shall be repaid at the earliest feasible date.
    ``(4) The Board of Trustees shall make a timely report to the 
Congress of any amounts transferred (including interest payments) under 
this subsection.''.

SEC. 5. EXCLUSION FROM GROSS INCOME FOR DISCHARGE OF STUDENT LOAN 
              INDEBTEDNESS UNDER THE STUDENT SECURITY LOAN FORGIVENESS 
              PROGRAM.

    (a) In General.--Paragraph (1) of section 108(f) of the Internal 
Revenue Code of 1986 is amended to read as follows:
            ``(1) In general.--In the case of an individual, gross 
        income does not include any amount which (but for this 
        subsection) would be includible in gross income by reason of 
        the discharge (in whole or in part) of any student loan if such 
        discharge was pursuant to--
                    ``(A) a provision of such loan under which all or 
                part of the indebtedness of the individual would be 
                discharged if the individual worked for a certain 
                period of time in certain professions for any of a 
                broad class of employers, or
                    ``(B) the receipt of student loan forgiveness 
                credits under section 455(r) of the Higher Education 
                Act of 1965.''.
    (b) Effective Date.--The amendments made by this section shall 
apply to discharges of indebtedness on or after the date of the 
enactment of this Act.
Student Security Act of 2017 This bill amends the Higher Education Act of 1965 to require the Department of Education and the Social Security Administration to jointly carry out a student loan forgiveness program that will forgive Federal Direct loans in exchange for delayed eligibility for old-age insurance benefits under the Social Security Act. In addition, the bill authorizes the transfer of amounts from the Federal Old-Age and Survivors Insurance Trust Fund into the Federal Disability Insurance Trust Fund if borrowing is necessary to pay full benefit payments from the Federal Disability Insurance Trust Fund. The bill amends the Internal Revenue Code to expand the exclusion from gross income of income attributable to the discharge of student loan indebtedness to include indebtedness discharged under the program.
Student Security Act of 2017