The court properly found that the waiver of subrogation provision in the underlying sprinkler system servicing agreement was neither overreaching nor procedurally or substantively unconscionable ( see Gillman v Chase Manhattan Bank, 73 NY2d 1, 10). We reject Plaintiffs' contention that the waiver does not bar a claim for gross negligence. As the Court of Appeals has held, "[a] distinction must be drawn between contractual provisions which seek to exempt a party from liability . . . and contractual provisions . . . which in effect simply require one of the parties to the contract to provide insurance for all of the parties" ( .Board of Educ, Union Free School Dist. No. 3, Town of Brookhaven v Valden Assoc., 46 NY2d 653, 657). We discern no public policy basis for limiting freedom of contract ( Oppenheimer Co. v Oppenheim, Appel, Dixon Co., 86 NY2d 685, 695) so as to preclude parties from agreeing that a waiver of subrogation bars not only claims of negligence but also claims of gross negligence. Thus, the waiver conclusively established a defense to plaintiff insurer's claim ( Goldman v Metropolitan Life Ins. Co., 5 NY3d 561, 571; Held v Kaufman, 91 NY2d 425, 430-431). Moreover, we hold as well that Plaintiffs' allegations of tortious conduct fail to allege the necessary violation of a legal duty independent of the contract with defendant ( Clark-Fitzpatrick, Inc. v Long Is. R.R. Co., 70 NY2d 382, 389). We have considered Plaintiffs' remaining contentions and find them unavailing.