Exhibit 10.17

EXECUTION COPY

EIGHTH AMENDMENT

To Loan Agreement

Dated as of June 1, 2009

by and among

PASSIVE ASSET TRANSACTIONS,
LLC,

as Borrower,

RFC ASSET
HOLDINGS II, LLC,

as Borrower,

RESIDENTIAL FUNDING COMPANY, LLC,

as Guarantor,

GMAC MORTGAGE, LLC,

as Guarantor,

RESIDENTIAL CAPITAL, LLC

as Guarantor,

Certain Affiliates of the Borrowers and Guarantors

party hereto as Obligors,

GMAC LLC,

as Initial Lender and as Lender Agent

and

Certain Other Financial Institutions and Persons from

time to time party hereto as
Lenders



---

This EIGHTH AMENDMENT (this Agreement) dated as of June 1, 2009
(the Amendment Effective Date), is by and among Passive Asset Transactions, LLC, a Delaware limited liability company (PATI), RFC Asset Holdings II, LLC, a Delaware limited liability company
(RAHI and, together with PATI, each a Borrower and collectively, the Borrowers), Residential Funding Company, LLC, a Delaware limited liability company (RFC), Residential
Capital, LLC, a Delaware limited liability company (ResCap), GMAC Mortgage, LLC, a Delaware limited liability company (GMAC Mortgage, and together with RFC and ResCap, each a Guarantor
and collectively, the Guarantors), the various other parties signatory hereto as obligors (the Obligors) GMAC LLC, a Delaware limited liability company (the Initial Lender), the financial
institutions and other Persons that are or may from time to time become parties hereto as Lenders (together with the Initial Lender and their respective successors and assigns, each a Lender and collectively,
the Lenders) and GMAC LLC, a Delaware limited liability company, as agent for the Lenders (in such capacity together with its successors and assigns in such capacity, the Lender Agent).

Reference is hereby made to the Loan Agreement, dated as of November 20, 2008 among the Borrowers, the Guarantors, the Lenders and the Lender Agent
(as amended and modified through the date hereof, the Loan Agreement).

RECITALS

1. Each of the parties hereto is a party to the Loan Agreement.

2. The parties hereto desire to make certain amendments to the Loan Agreement.

3. Each of the parties
hereto, by its signature hereto, hereby acknowledges, consents and agrees to the matters set forth herein.

4. In consideration of the
premises and mutual agreements herein contained and for good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the parties hereto agree as follows:

ARTICLE I

DEFINED TERMS

SECTION 1.1 Capitalized terms used herein and not otherwise defined shall have the meaning set forth in the Loan Agreement.



| |  |  |  |                                   
| |  |  |  | ----------------------------------
| |  |  |  | Eighth Amendment to Loan Agreement



---

ARTICLE II

AMENDMENTS TO THE LOAN AGREEMENT

SECTION 2.1 Amendments to the Loan Agreement. Each of the parties
hereto hereby consents and agrees that the Loan Agreement shall be amended as of the Amendment Effective Date as follows:

(a) The first sentence of Section 2.03(a) of the Loan Agreement is hereby amended by replacing clause (iii) thereof with the following:

(iii) no Borrower Funding Request may be made unless either (A) (1) the Unrestricted ResCap Liquidity at the opening of
business on the proposed Funding Date (as estimated by the close of business on the Business Day prior to such Funding Date) is less than the Unrestricted ResCap Liquidity Threshold and (2) based on such estimates, after giving effect to the
advance of such Loans and Parallel Loans, the Unrestricted ResCap Liquidity does not exceed the Unrestricted ResCap Liquidity Threshold or (B) (1) the Consolidated Liquidity at the opening of business on the proposed Funding Date (as
estimated by the close of business on the Business Day prior to such Funding Date) is less than $800,000,000 and (2) based on such estimates, after giving effect to the advance of such Loans and Parallel Loans, the Consolidated Liquidity does
not exceed the Consolidated Liquidity Threshold.

(b) The second sentence of Section 2.08(c) of the Loan
Agreement is hereby amended and restated to read as follows:

If the Liquidity Excess Amount is greater than $0, no
later than 11:00 a.m. (New York City time) on the Business Day following the Test Date, the Borrowers shall jointly and severally repay outstanding Loans and/or Parallel Loans in an amount equal to the highest portion of the Liquidity Excess
Amount that could be paid by the Borrowers and still satisfy the requirement that, after giving effect to such payment, (a) the Unrestricted ResCap Liquidity is greater than or equal to the Unrestricted ResCap Liquidity Threshold and
(b) the Consolidated Liquidity is greater than or equal to the Consolidated Liquidity Threshold; provided that any such repayment shall be applied first to Parallel Loans until all Parallel Loans are paid in full.

(c) Section 3.01(f) of the Loan Agreement is hereby amended by inserting the following sentence at the end of the section:

Proceeds of Collateral shall be allocated to the Secured Parties (as defined in the Omnibus Security Agreement)
in such manner as is determined by the Omnibus Agent in its sole discretion.

(d) Section 7.01(q) of the Loan
Agreement is hereby amended and restated as follows:

(q) REO Property. No later than June 5, 2009, the
Obligors and Lender Agent shall agree upon a structure and implementation process and timeline to protect the Lender Agents and the Omnibus Agents interest in REO Property resulting from the foreclosure of US Mortgage Loans.

(e) Section 7.01(y) of the Loan Agreement is hereby deleted in its entirety.



| |  |   |  |                                   
| |  | - |  | ----------------------------------
| |  | 2 |  | Eighth Amendment to Loan Agreement



---

(f) Section 8.01(n) of the Loan Agreement is hereby amended and restated to
read as follows:

(n) (i) an Event of Default or Termination Event shall have occurred under
any Derivative Agreement (as such terms are defined in the applicable Derivative Agreement), (ii) a Default shall have occurred under the Master Netting Agreement (as such term is defined in the Master Netting Agreement),
(iii) an Event of Default shall have occurred under any Facility Document (as such terms are defined in the MSR Loan Agreement) or (iv) an Event of Default shall have occurred under any Facility
Document (as such terms are defined in the Credit Agreement).

SECTION 2.2 Amendments to Definitions. Each of the
parties hereto hereby consents and agrees that Schedule 1.01 to the Loan Agreement shall be amended as of the Amendment Effective Date as follows:

(a) The following definitions in Schedule 1.01 to the Loan Agreement are hereby amended and restated in full to read as follows:

Aggregate Commitment Amount means, at any time, $430,000,000. The Borrowers may elect to reduce the Aggregate
Commitment Amount in accordance with Section 2.10(b).

Available Amount means, on any
Business Day, an amount equal to the lesser of (a) the Derivative Adjusted Available Amount, and (b) the excess, if any, of the then current Borrowing Base over the Credit Agreement Outstandings.

Hedge Documents means the Primary Hedge Documents, the Confirmations, and the Hedge Security Agreement, each as defined
in the Senior Debt Loan Agreement.

(b) Clause (o) of the definition of Permitted Liens in Schedule
1.01 to the Loan Agreement is hereby amended and restated in full to read as follows:

(o) Liens granted
(i) under the Security Documents in favor of the Omnibus Agent or the Lender Agent to secure the Obligations, (ii) under the Facility Documents (as defined in the MSR Loan Agreement) in favor of the Omnibus Agent or GMAC, as
lender, securing the Obligations (as defined in the MSR Loan Agreement), (iii) under the Derivative Documents in favor of the Omnibus Agent or GMAC IM securing obligations under the Derivative Documents, or (iv) under the
Facility Documents (as defined in the Credit Agreement) in favor of the Omnibus Agent or GMAC LLC, securing the Obligations (as defined in the Credit Agreement);



| |  |   |  |                                   
| |  | - |  | ----------------------------------
| |  | 3 |  | Eighth Amendment to Loan Agreement



---

(c) The following new defined terms are added to Schedule 1.01 of the Loan
Agreement, each in the correct alphabetical spot:

Credit Agreement means the Credit Agreement, dated as
of June 1, 2009, among PATI, RAHI, RFC, ResCap, GMAC Mortgage and GMAC LLC, as initial lender, credit agent and Omnibus Agent and certain other financial institutions and persons from time to time party thereto as lenders, as the same may
be amended, supplemented, restated or otherwise modified from time to time.

Credit Agreement
Outstandings means, on any day, the aggregate outstanding principal amount of loans made under the Credit Agreement, taking into account all loan fundings and repayments made or to be made on such day thereunder.

Parallel Loans means loans to be made under the Credit Agreement, provided that for purposes of
Section 2.03(c) hereof, such loans are made contemporaneously with the making of Loans hereunder.

(d) The
following defined terms in Schedule 1.01 to the Loan Agreement are hereby deleted:

Aggregate GMAC Replacement
Collateral Amount; GMAC Bank Posted Collateral; and Litigation Bond Collateral.

(e) The definition of GSAP
Modification Conditions in Schedule 1.01 of the Loan Agreement is hereby amended by deleting the phrase to the Omnibus Security Agreement in clause (b) thereof and replacing it with phrase the Security Documents
in a manner satisfactory to the Lender Agent.

SECTION 2.3 Amendment to Schedule 2.04. The third paragraph of Section 5
of Schedule 2.04 is hereby amended and restated as follows:

With respect to Supporting Assets for the Flume No. 8 Notes, the
initial Specified Percentage for Group A Loans (as defined in the Flume No. 8 Security Documents) shall be 50% and the initial Specified Percentage for Group B Loans (as defined in the Flume No. 8 Security Documents) will be 36%.



| |  |   |  |                                   
| |  | - |  | ----------------------------------
| |  | 4 |  | Eighth Amendment to Loan Agreement



---

SECTION 2.4 Amendment to Schedule 5.02. Schedule 5.02(h) is hereby amended and restated as
follows:

(h) The making of such Loan and any Parallel Loan, and the application of the proceeds thereof, shall result
in the Unrestricted ResCap Liquidity being greater or equal to $250,000,000 and the Consolidated Liquidity being greater or equal to $750,000,000.

ARTICLE III

CONDITIONS TO EFFECTIVENESS

SECTION 3.1 Amendment Effective Date. This Agreement and the provisions contained herein shall become effective as of the Amendment Effective
Date.

SECTION 3.2 Opinions. On or before June 1, 2009, the Obligors shall deliver or cause to be delivered opinions of counsel
to the Borrowers, the Guarantors and Obligors with respect to the transactions contemplated hereby, which opinions shall be in form and substance satisfactory to the Lender Agent.

SECTION 3.3 Other. On or before June 1, 2009, the Obligors shall deliver or cause to be delivered such other documents, including but not
limited to the Obligors board resolutions approving this Agreement, as the Lender Agent may reasonably request, which documents will be in form and substance satisfactory to the Lender Agent.

ARTICLE IV

NOTICES, ACKNOWLEDGEMENTS,
CONFIRMATION AND REPRESENTATIONS

AND WARRANTIES

SECTION 4.1 Notice. Each party hereto hereby acknowledges timely notice of the execution of this Agreement and of the transactions and amendments contemplated hereby. Each party hereto hereby waives any notice
requirement contained in the Loan Agreement or the Facility Documents with respect to the execution of this Agreement.

SECTION 4.2
Reservation of Rights. The Borrowers and the Guarantors each hereby acknowledge and agree that none of this Agreement, the making of any loan under the Loan Agreement by GMAC LLC and GMAC LLCs or the Lender Agents consent
thereto either before or after the Amendment Effective Date shall constitute (w) an approval of the accuracy of all or any portion of any Borrower funding request or related certification, (x) a waiver or forbearance by GMAC LLC or the
Lender Agent under any of the Facility Documents, (y) the acceptance by any Lender or the Lender Agent of any course of conduct by any Obligor or any other Person or (z) an agreement by GMAC LLC or the Lender Agent to amend any of the
Facility Documents without all required approvals or related certification. The Borrowers and the Guarantors each hereby further acknowledge and agree that GMAC LLC and the Lender Agent reserve all rights, remedies and options under the Facility
Documents to require either Borrower to satisfy in all respects the conditions relating to the making of any loan under the Facility Documents and each Obligor to perform all of its obligations under the Facility Documents which are then due and
owing or are susceptible of performance, as the case may be.



| |  |   |  |                                   
| |  | - |  | ----------------------------------
| |  | 5 |  | Eighth Amendment to Loan Agreement



---

SECTION 4.3 Confirmation of the Facility Documents. The Borrowers, the Guarantors and the Obligors
each hereby acknowledge and agree that the Loan Agreement and each other Facility Document (as amended as of the date hereof) are each ratified and confirmed in all respects and shall remain in full force and effect in accordance with their
respective terms. Without limiting the foregoing, each Obligor reaffirms its grant of a security interest in all the Collateral pledged by it, and agrees that such security interest secures all Obligations. As of the Amendment Effective Date, each
reference in the Loan Agreement to this Agreement or in any other Facility Document to the Loan Agreement shall mean the Loan Agreement as amended by this Agreement, and as hereinafter amended or restated.

SECTION 4.4 Representations and Warranties. By its signature hereto, each Borrower, each Guarantor and each other Obligor hereby represents and
warrants that, before and after giving effect to this Agreement, as follows:

(a) Its representations and warranties set
forth in the Facility Documents are true and correct as if made on the date hereof, except to the extent they expressly relate to an earlier date; and

(b) No Default has occurred and is continuing.

ARTICLE V

MISCELLANEOUS

SECTION 5.1 GOVERNING
LAW. THIS AGREEMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK WITHOUT REGARD TO CONFLICTS OF LAWS PRINCIPLES (BUT WITH REFERENCE TO SECTION 5-1401 OF THE NEW YORK GENERAL OBLIGATIONS LAW, WHICH
BY ITS TERMS APPLIES TO THIS AGREEMENT).

SECTION 5.2 Execution in Counterparts. This Agreement may be executed in any number of
counterparts and by different parties hereto in separate counterparts, each of which when so executed shall be deemed to be an original (whether such counterpart is originally executed or an electronic copy of an original and each party hereto
expressly waives its rights to receive originally executed documents) and all of which when taken together shall constitute one and the same agreement.

SECTION 5.3 WAIVER OF JURY TRIAL. EACH OF THE PARTIES HEREBY IRREVOCABLY WAIVES ANY AND ALL RIGHT TO A TRIAL BY JURY WITH RESPECT TO ANY LEGAL PROCEEDING ARISING OUT OF OR RELATING TO THIS AGREEMENT.

SECTION 5.4 Entire Agreement. This Agreement, the Loan Agreement and the other Facility Documents embody the entire agreement and
understanding of the parties hereto and supersede any and all prior agreements, arrangements and understanding relating to the matters provided for herein.



| |  |   |  |                                   
| |  | - |  | ----------------------------------
| |  | 6 |  | Eighth Amendment to Loan Agreement



---

SECTION 5.5 Captions. The various captions in this Agreement are included for convenience only and
shall not affect the meaning or interpretation of any provision of this Agreement.

SECTION 5.6 Severability. If any provision of
this Agreement, or the application thereof to any party or any circumstance, is held to be unenforceable, invalid or illegal (in whole or in part) for any reason (in any jurisdiction), the remaining terms of this Agreement, modified by the deletion
of the unenforceable invalid or illegal portion (in any relevant jurisdiction), will continue in full force and effect, and such unenforceability, invalidity or illegality will not otherwise affect the enforceability, validity or legality of
the remaining terms of this Agreement so long as this Agreement, as so modified, continues to express, without material change, the original intentions of the parties as to the subject matter hereof and the deletion of such portion of this
Agreement will not substantially impair the respective expectations of the parties or the practical realization of the benefits that would otherwise be conferred upon the parties.

SECTION 5.7 SUBMISSION TO JURISDICTION. EACH PARTY HERETO HEREBY IRREVOCABLY SUBMITS TO THE NONEXCLUSIVE JURISDICTION OF THE COURTS OF THE STATE
OF NEW YORK LOCATED IN THE CITY OF MANHATTAN OR IN THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK FOR PURPOSES OF ALL LEGAL PROCEEDINGS ARISING OUT OF OR RELATING TO THIS AGREEMENT OR THE TRANSACTIONS CONTEMPLATED HEREBY AND
IRREVOCABLY AGREES TO BE BOUND BY ANY JUDGMENT RENDERED THEREBY IN CONNECTION WITH SUCH LITIGATION. EACH PARTY HERETO IRREVOCABLY WAIVES, TO THE FULLEST EXTENT PERMITTED BY LAW, ANY OBJECTION WHICH IT MAY NOW OR HEREAFTER HAVE TO THE LAYING OF
THE VENUE OF ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT AND ANY CLAIM THAT ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT HAS BEEN BROUGHT IN AN INCONVENIENT FORUM. EACH PARTY HERETO HEREBY CONSENTS TO PROCESS BEING SERVED IN ANY SUIT, ACTION OR
PROCEEDING WITH RESPECT TO THIS AGREEMENT, OR ANY DOCUMENT DELIVERED PURSUANT HERETO BY THE MAILING OF A COPY THEREOF BY REGISTERED OR CERTIFIED MAIL, POSTAGE PREPAID, RETURN RECEIPT REQUESTED, TO ITS RESPECTIVE ADDRESS SPECIFIED AT THE TIME FOR
NOTICES UNDER THIS AGREEMENT OR TO ANY OTHER ADDRESS OF WHICH IT SHALL HAVE GIVEN WRITTEN OR ELECTRONIC NOTICE TO THE OTHER PARTIES. THE FOREGOING SHALL NOT LIMIT THE ABILITY OF ANY PARTY HERETO TO BRING SUIT IN THE COURTS OF ANY JURISDICTION.

[signature pages follow]



| |  |   |  |                                   
| |  | - |  | ----------------------------------
| |  | 7 |  | Eighth Amendment to Loan Agreement



---

IN WITNESS WHEREOF, the parties have caused this Agreement to be executed by their respective officers
thereunto duly authorized, as of the date first above written.



RFC ASSET HOLDINGS II, LLC, as
BorrowerBy:

/s/ John M. PetersonName:

John M. PetersonTitle:

Treasurer




| |  |     |  |                                   
| |  | --- |  | ----------------------------------
| |  | S-1 |  | Eighth Amendment to Loan Agreement



---

PASSIVE ASSET TRANSACTIONS, LLC, as BorrowerBy:

/s/ John M. PetersonName:

John M. PetersonTitle:

Treasurer




| |  |     |  |                                   
| |  | --- |  | ----------------------------------
| |  | S-2 |  | Eighth Amendment to Loan Agreement



---

RESIDENTIAL FUNDING COMPANY, LLC, as
GuarantorBy:

/s/ John M. PetersonName:

John M. PetersonTitle:

Treasurer




| |  |     |  |                                   
| |  | --- |  | ----------------------------------
| |  | S-3 |  | Eighth Amendment to Loan Agreement



---

GMAC MORTGAGE, LLC, as
GuarantorBy:

/s/ John M. PetersonName:

John M. PetersonTitle:

Treasurer




| |  |     |  |                                   
| |  | --- |  | ----------------------------------
| |  | S-4 |  | Eighth Amendment to Loan Agreement



---

RESIDENTIAL CAPITAL, LLC, as
GuarantorBy:

/s/ John M. PetersonName:

John M. PetersonTitle:

Assistant Treasurer




| |  |     |  |                                   
| |  | --- |  | ----------------------------------
| |  | S-5 |  | Eighth Amendment to Loan Agreement



---

GMAC LLC, as Lender Agent and Initial LenderBy:

/s/ David C. WalkerName:

David C. WalkerTitle:

Business Unit Treasury Executive




| |  |     |  |                                   
| |  | --- |  | ----------------------------------
| |  | S-6 |  | Eighth Amendment to Loan Agreement